Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -125,13 +125,13 @@ def main():
|
|
125 |
)
|
126 |
|
127 |
def echo3(message, history):
|
128 |
-
answer = agent.invoke(
|
129 |
return answer['output']
|
130 |
|
131 |
downtime = gr.ChatInterface(fn=echo1, title="SQL-Chatbot", description="Q/A on Downtime details table")
|
132 |
production = gr.ChatInterface(fn=echo2, title="SQL-Chatbot", description="Q/A on Production details table")
|
133 |
-
|
134 |
-
demo = gr.TabbedInterface([
|
135 |
demo.launch(debug=True)
|
136 |
|
137 |
if __name__ == "__main__":
|
|
|
125 |
)
|
126 |
|
127 |
def echo3(message, history):
|
128 |
+
answer = agent.invoke(prompt_agent.format_prompt(question=message))
|
129 |
return answer['output']
|
130 |
|
131 |
downtime = gr.ChatInterface(fn=echo1, title="SQL-Chatbot", description="Q/A on Downtime details table")
|
132 |
production = gr.ChatInterface(fn=echo2, title="SQL-Chatbot", description="Q/A on Production details table")
|
133 |
+
agent_tab = gr.ChatInterface(fn=echo3, title="SQL-Chatbot", description="General Chatbot with self-thinking capability, more robust to questions.")
|
134 |
+
demo = gr.TabbedInterface([agent_tab, downtime, production], ['DB_bot-both tables','ShiftDownTimeDetails', 'ShiftProductionDetails'])
|
135 |
demo.launch(debug=True)
|
136 |
|
137 |
if __name__ == "__main__":
|