Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,8 +81,7 @@ def invoke(openai_api_key, prompt, agent_option):
|
|
| 81 |
end_time_ms
|
| 82 |
)
|
| 83 |
|
| 84 |
-
|
| 85 |
-
return str(result)
|
| 86 |
|
| 87 |
gr.close_all()
|
| 88 |
|
|
@@ -92,7 +91,7 @@ demo = gr.Interface(
|
|
| 92 |
gr.Textbox(label = "Prompt", lines = 1,
|
| 93 |
value = "How does current weather in San Francisco and Paris compare in metric and imperial system? Answer in JSON format and include today's date."),
|
| 94 |
gr.Radio([AGENT_OFF, AGENT_LANGCHAIN, AGENT_LLAMAINDEX], label = "Use Agent", value = AGENT_LANGCHAIN)],
|
| 95 |
-
outputs = [gr.
|
| 96 |
title = "Agentic Reasoning Application",
|
| 97 |
description = os.environ["DESCRIPTION"]
|
| 98 |
)
|
|
|
|
| 81 |
end_time_ms
|
| 82 |
)
|
| 83 |
|
| 84 |
+
return result
|
|
|
|
| 85 |
|
| 86 |
gr.close_all()
|
| 87 |
|
|
|
|
| 91 |
gr.Textbox(label = "Prompt", lines = 1,
|
| 92 |
value = "How does current weather in San Francisco and Paris compare in metric and imperial system? Answer in JSON format and include today's date."),
|
| 93 |
gr.Radio([AGENT_OFF, AGENT_LANGCHAIN, AGENT_LLAMAINDEX], label = "Use Agent", value = AGENT_LANGCHAIN)],
|
| 94 |
+
outputs = [gr.Textbox(label = "Completion", value=os.environ["OUTPUT"])],
|
| 95 |
title = "Agentic Reasoning Application",
|
| 96 |
description = os.environ["DESCRIPTION"]
|
| 97 |
)
|