Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -32,16 +32,14 @@ def invoke(openai_api_key, prompt, agent_option):
|
|
32 |
try:
|
33 |
if (agent_option == AGENT_LANGCHAIN):
|
34 |
completion = agent_langchain(
|
35 |
-
config
|
36 |
-
config["temperature"],
|
37 |
prompt
|
38 |
)
|
39 |
|
40 |
output = completion["output"]
|
41 |
elif (agent_option == AGENT_LLAMAINDEX):
|
42 |
output = agent_llamaindex(
|
43 |
-
config
|
44 |
-
config["temperature"],
|
45 |
prompt
|
46 |
)
|
47 |
else:
|
@@ -70,6 +68,7 @@ demo = gr.Interface(
|
|
70 |
gr.Radio([AGENT_OFF, AGENT_LANGCHAIN, AGENT_LLAMAINDEX], label = "Use Agent", value = AGENT_LANGCHAIN)],
|
71 |
outputs = [gr.Textbox(label = "Completion", lines = 1)],
|
72 |
title = "Real-Time Reasoning Application",
|
73 |
-
description = os.environ["DESCRIPTION"]
|
|
|
74 |
|
75 |
demo.launch()
|
|
|
32 |
try:
|
33 |
if (agent_option == AGENT_LANGCHAIN):
|
34 |
completion = agent_langchain(
|
35 |
+
config,
|
|
|
36 |
prompt
|
37 |
)
|
38 |
|
39 |
output = completion["output"]
|
40 |
elif (agent_option == AGENT_LLAMAINDEX):
|
41 |
output = agent_llamaindex(
|
42 |
+
config,
|
|
|
43 |
prompt
|
44 |
)
|
45 |
else:
|
|
|
68 |
gr.Radio([AGENT_OFF, AGENT_LANGCHAIN, AGENT_LLAMAINDEX], label = "Use Agent", value = AGENT_LANGCHAIN)],
|
69 |
outputs = [gr.Textbox(label = "Completion", lines = 1)],
|
70 |
title = "Real-Time Reasoning Application",
|
71 |
+
description = os.environ["DESCRIPTION"]
|
72 |
+
)
|
73 |
|
74 |
demo.launch()
|