Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -206,4 +206,21 @@ if __name__ == "__main__":
|
|
| 206 |
print("-"*(60 + len(" App Starting ")) + "\n")
|
| 207 |
|
| 208 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
demo.launch(debug=True, share=False)
|
|
|
|
| 206 |
print("-"*(60 + len(" App Starting ")) + "\n")
|
| 207 |
|
| 208 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
| 209 |
+
gr.Markdown("## Ask your Agent Any Question (Test Manually)")
|
| 210 |
+
|
| 211 |
+
with gr.Row():
|
| 212 |
+
free_question = gr.Textbox(label="Ask your own question")
|
| 213 |
+
free_response = gr.Textbox(label="Agent's Response", interactive=False)
|
| 214 |
+
|
| 215 |
+
# Create an agent instance once to avoid re-instantiating
|
| 216 |
+
test_agent = BasicAgent()
|
| 217 |
+
|
| 218 |
+
def run_custom_query(q):
|
| 219 |
+
return test_agent(q)
|
| 220 |
+
|
| 221 |
+
free_question.submit(fn=run_custom_query, inputs=free_question, outputs=free_response)
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
|
| 226 |
demo.launch(debug=True, share=False)
|