smishr-18's picture
Update app.py
f8e9e33
raw
history blame
362 Bytes
import gradio as gr
import cv2
from llm import llm
import numpy as np
import os
def process_image(image):
# Convert Gradio Image to OpenCV format
img = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR)
# Perform your image processing
result = llm(img)
return result
iface = gr.Interface(fn=process_image, inputs="image", outputs='text')