Spaces:
Sleeping
Sleeping
thoristhor
commited on
Commit
•
b24ce13
1
Parent(s):
ee0e98a
Update app.py
Browse files
app.py
CHANGED
@@ -27,12 +27,15 @@ memory = ConversationBufferMemory(memory_key="chat_history")
|
|
27 |
llm=OpenAI(temperature=0)
|
28 |
agent_chain = initialize_agent(tools, llm, agent="conversational-react-description", memory=memory)
|
29 |
|
|
|
|
|
|
|
30 |
with gr.Blocks() as demo:
|
31 |
chatbot = gr.Chatbot()
|
32 |
|
33 |
with gr.Row():
|
34 |
txt = gr.Textbox(show_label=False, placeholder="Enter text and press enter").style(container=False)
|
35 |
|
36 |
-
txt.submit(
|
37 |
|
38 |
demo.launch()
|
|
|
27 |
llm=OpenAI(temperature=0)
|
28 |
agent_chain = initialize_agent(tools, llm, agent="conversational-react-description", memory=memory)
|
29 |
|
30 |
+
def run_something(isfa: str):
|
31 |
+
return agent_chain.run(input=isfa)
|
32 |
+
|
33 |
with gr.Blocks() as demo:
|
34 |
chatbot = gr.Chatbot()
|
35 |
|
36 |
with gr.Row():
|
37 |
txt = gr.Textbox(show_label=False, placeholder="Enter text and press enter").style(container=False)
|
38 |
|
39 |
+
txt.submit(run_something)
|
40 |
|
41 |
demo.launch()
|