Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,11 @@ def invoke(openai_api_key, prompt, agent_option):
|
|
85 |
)
|
86 |
|
87 |
del os.environ["OPENAI_API_KEY"]
|
88 |
-
|
|
|
|
|
|
|
|
|
89 |
return result
|
90 |
|
91 |
gr.close_all()
|
@@ -96,7 +100,7 @@ demo = gr.Interface(
|
|
96 |
gr.Textbox(label = "Prompt", lines = 1,
|
97 |
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."),
|
98 |
gr.Radio([AGENT_OFF, AGENT_LANGCHAIN, AGENT_LLAMAINDEX], label = "Use Agent", value = AGENT_LANGCHAIN)],
|
99 |
-
outputs = [gr.
|
100 |
title = "Agentic Reasoning Application",
|
101 |
description = os.environ["DESCRIPTION"]
|
102 |
)
|
|
|
85 |
)
|
86 |
|
87 |
del os.environ["OPENAI_API_KEY"]
|
88 |
+
|
89 |
+
print("===")
|
90 |
+
print(result)
|
91 |
+
print("===")
|
92 |
+
|
93 |
return result
|
94 |
|
95 |
gr.close_all()
|
|
|
100 |
gr.Textbox(label = "Prompt", lines = 1,
|
101 |
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."),
|
102 |
gr.Radio([AGENT_OFF, AGENT_LANGCHAIN, AGENT_LLAMAINDEX], label = "Use Agent", value = AGENT_LANGCHAIN)],
|
103 |
+
outputs = [gr.Textbox(label = "Completion", value=os.environ["OUTPUT"])],
|
104 |
title = "Agentic Reasoning Application",
|
105 |
description = os.environ["DESCRIPTION"]
|
106 |
)
|