InfiniteValueMe commited on
Commit
a58fdf1
·
verified ·
1 Parent(s): 7e21d3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
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
- #Hidden Interface for /api/predict
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()