Commit
·
84be6ce
1
Parent(s):
55d1cfb
add display thinking
Browse files- Gradio_UI.py +3 -2
- app.py +2 -2
Gradio_UI.py
CHANGED
@@ -194,8 +194,9 @@ class GradioUI:
|
|
194 |
import gradio as gr
|
195 |
messages.append(gr.ChatMessage(role="user", content=prompt))
|
196 |
yield messages
|
197 |
-
|
198 |
-
|
|
|
199 |
for msg in stream_to_gradio(self.agent, task=prompt, reset_agent_memory=False):
|
200 |
messages.append(msg)
|
201 |
yield messages
|
|
|
194 |
import gradio as gr
|
195 |
messages.append(gr.ChatMessage(role="user", content=prompt))
|
196 |
yield messages
|
197 |
+
gr.update(
|
198 |
+
value="<center><h1>Thinking...</h1></center>", visible=True
|
199 |
+
)
|
200 |
for msg in stream_to_gradio(self.agent, task=prompt, reset_agent_memory=False):
|
201 |
messages.append(msg)
|
202 |
yield messages
|
app.py
CHANGED
@@ -115,7 +115,7 @@ def provide_my_information(query: str) -> str:
|
|
115 |
return "I'm sorry, I don't have information on that. Please ask about my name, location, occupation, education, skills, hobbies, or contact details."
|
116 |
|
117 |
|
118 |
-
|
119 |
final_answer = FinalAnswerTool()
|
120 |
visit_webpage = VisitWebpageTool()
|
121 |
web_search = DuckDuckGoSearchTool()
|
@@ -141,7 +141,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
141 |
|
142 |
agent = CodeAgent(
|
143 |
model=model,
|
144 |
-
tools=[final_answer,calculate_risk_metrics,visit_webpage,web_search,provide_my_information], ## add your tools here (don't remove final answer)
|
145 |
max_steps=6,
|
146 |
verbosity_level=1,
|
147 |
grammar=None,
|
|
|
115 |
return "I'm sorry, I don't have information on that. Please ask about my name, location, occupation, education, skills, hobbies, or contact details."
|
116 |
|
117 |
|
118 |
+
qcm_tool = QCMTool("info/questions.json")
|
119 |
final_answer = FinalAnswerTool()
|
120 |
visit_webpage = VisitWebpageTool()
|
121 |
web_search = DuckDuckGoSearchTool()
|
|
|
141 |
|
142 |
agent = CodeAgent(
|
143 |
model=model,
|
144 |
+
tools=[final_answer,calculate_risk_metrics,qcm_tool,visit_webpage,web_search,provide_my_information], ## add your tools here (don't remove final answer)
|
145 |
max_steps=6,
|
146 |
verbosity_level=1,
|
147 |
grammar=None,
|