tommy24 commited on
Commit
64a5f8f
·
1 Parent(s): b540f18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -174,9 +174,9 @@ def function(Textbox, Textbox2, Textbox3):
174
  response = requests.post(target2, json=data)
175
  reply = response.content.decode("utf-8")
176
  reply = reply.replace(" ", "%20")
177
- image_array = download_image(f"https://api.placid.app/u/pydav4ibo?quote[text]={reply}")
178
  data["messages"].append({"role": "assistant", "content": reply})
179
- return image_array
180
  except Exception as e:
181
  print(traceback.format_exc())
182
  return "Please Wait!"
@@ -189,9 +189,9 @@ inputs = [
189
  gr.inputs.Textbox(label="Textbox3", type="password")
190
  ]
191
 
192
- outputs = gr.outputs.Image(type="numpy")
193
 
194
- iface = gr.Interface(fn=function, inputs=inputs, outputs=outputs)
195
 
196
  iface.launch()
197
 
 
174
  response = requests.post(target2, json=data)
175
  reply = response.content.decode("utf-8")
176
  reply = reply.replace(" ", "%20")
177
+ # image_array = download_image(f"https://api.placid.app/u/pydav4ibo?quote[text]={reply}")
178
  data["messages"].append({"role": "assistant", "content": reply})
179
+ return reply
180
  except Exception as e:
181
  print(traceback.format_exc())
182
  return "Please Wait!"
 
189
  gr.inputs.Textbox(label="Textbox3", type="password")
190
  ]
191
 
192
+ # outputs = gr.outputs.Image(type="numpy")
193
 
194
+ iface = gr.Interface(fn=function, inputs=inputs, outputs="text")
195
 
196
  iface.launch()
197