XeroDN commited on
Commit
0bd02f0
·
verified ·
1 Parent(s): a8cde18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from agent_code import agent
3
+
4
+ def ask_question(q):
5
+ state = {
6
+ "question": q,
7
+ "thoughts": [],
8
+ "tool_results": [],
9
+ "answer": None
10
+ }
11
+ result = agent.invoke(state)
12
+ return result["answer"]
13
+
14
+ gr.Interface(fn=ask_question,
15
+ inputs=gr.Textbox(label="Ask a question"),
16
+ outputs="text",
17
+ title="GIAI LangGraph Agent").launch()