Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -136,12 +136,6 @@ with gr.Blocks(title="Infinite Agent", css=open(css_path).read()) as demo:
|
|
| 136 |
history, _ = chat_with_infinite_agent(message, lang, [])
|
| 137 |
return history[-1]["content"]
|
| 138 |
|
| 139 |
-
|
| 140 |
-
api_interface = gr.Interface(
|
| 141 |
-
fn=api_predict,
|
| 142 |
-
inputs=[gr.Textbox(label="Message"), gr.Textbox(label="Language", value="English")],
|
| 143 |
-
outputs=gr.Textbox(label="Response"),
|
| 144 |
-
allow_flagging="never",
|
| 145 |
-
)
|
| 146 |
|
| 147 |
demo.launch()
|
|
|
|
| 136 |
history, _ = chat_with_infinite_agent(message, lang, [])
|
| 137 |
return history[-1]["content"]
|
| 138 |
|
| 139 |
+
demo.add_api_route("/api/predict", api_predict, methods=["POST"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
demo.launch()
|