hsienchen commited on
Commit
e4a6840
1 Parent(s): 7ec0cf0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -58,14 +58,12 @@ def output_query_message(txt,img):
58
  def output_llm_response(text,img):
59
  if not img:
60
  response = txt_model.generate_content(text)
61
- history = [(None,response.text)]
62
- return history
63
 
64
  else:
65
  img = PIL.Image.open(img)
66
  response = vis_model.generate_content([text,img])
67
- history = [(None,response.text)]
68
- return history
69
 
70
 
71
  # Interface Code- Selector method
@@ -78,7 +76,7 @@ def sentence_builder(animal, place):
78
 
79
  with gr.Blocks(theme='snehilsanyal/scikit-learn') as app1:
80
  title = gr.Markdown("## COT ##")
81
- with gr.Row():
82
  image_box = gr.Image(type="filepath")
83
 
84
  outputbox = gr.Textbox(label="Output")
 
58
  def output_llm_response(text,img):
59
  if not img:
60
  response = txt_model.generate_content(text)
61
+ return response.text
 
62
 
63
  else:
64
  img = PIL.Image.open(img)
65
  response = vis_model.generate_content([text,img])
66
+ return response.text
 
67
 
68
 
69
  # Interface Code- Selector method
 
76
 
77
  with gr.Blocks(theme='snehilsanyal/scikit-learn') as app1:
78
  title = gr.Markdown("## COT ##")
79
+ with gr.Column():
80
  image_box = gr.Image(type="filepath")
81
 
82
  outputbox = gr.Textbox(label="Output")