hantech commited on
Commit
91f1be1
·
verified ·
1 Parent(s): 9f342a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,11 +8,11 @@ def process_image(image):
8
  img = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR)
9
 
10
  # Perform your image processing
11
- result = llm(img)
12
 
13
- return result
14
 
15
- iface = gr.Interface(fn=process_image, inputs="image", outputs=gr.Markdown(), live=True, title="Nutrition Content Based LLM", description="The llm based project needs a clear image of only the Nutrition Facts Box at the back of a product, \n The llm shows the content and give health advice based on the Nutritions Facts.")
16
 
17
 
18
  iface.launch(share=True)
 
8
  img = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR)
9
 
10
  # Perform your image processing
11
+ text,result = llm(img)
12
 
13
+ return text,result
14
 
15
+ iface = gr.Interface(fn=process_image, inputs="image", outputs=[gr.Textbox(),gr.Markdown()], live=True, title="Nutrition Content Based LLM", description="The llm based project needs a clear image of only the Nutrition Facts Box at the back of a product, \n The llm shows the content and give health advice based on the Nutritions Facts.")
16
 
17
 
18
  iface.launch(share=True)