Spaces:
Sleeping
Sleeping
from pkgs import QuotaManager, executor | |
import os | |
import base64 | |
from PIL import Image | |
import io | |
def answer(input_img): | |
buffer = io.BytesIO() | |
input_img.save(buffer, format="PNG") | |
image_data = base64.b64encode(buffer.getvalue()).decode('utf-8') | |
# print(os.getenv('PROMPT')) | |
respose = executor.execute_with_image(user_input= '', model_input= os.environ['PROMPT'], base64_image=image_data) | |
return respose |