This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import os | |
import re | |
from PIL import Image | |
from transformers import AutoProcessor, AutoModelForVision2Seq | |
def log_message(message): | |
print(message) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SERVER_IP="192.168.1.191" | |
SERVER_PORT="5000" | |
SERVER_URL="http://${SERVER_IP}:${SERVER_PORT}/process" | |
send_image() { | |
local image_path=$1 | |
echo "Sending ${image_path} to ${SERVER_URL}" | |
curl -X POST -F "images=@${image_path}" "${SERVER_URL}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from flask import Flask, request, jsonify | |
from PIL import Image | |
from transformers import Blip2Processor, Blip2ForConditionalGeneration | |
import torch | |
import io | |
app = Flask(__name__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import os | |
from PIL import Image | |
from transformers import Blip2Processor, Blip2ForConditionalGeneration | |
import torch | |
def log_message(message): | |
print(message) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am iamironz on github. | |
* I am iamironz (https://keybase.io/iamironz) on keybase. | |
* I have a public key ASBzLlsV8CRZx2jlvPCnfyNqfWL-OmV8C5MVBFz9W35ZCwo | |
To claim this, I am signing this object: |