Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
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=
|
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 |
|