aparnavellala commited on
Commit
a63ee98
·
verified ·
1 Parent(s): a8ddba6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -6,6 +6,7 @@ from langgraph.graph import StateGraph, END
6
  from pydantic import BaseModel
7
  import gradio as gr
8
 
 
9
  # ---------------------------------------
10
  # Step 1: Define Hugging Face LLM (Qwen/Qwen2.5-7B-Instruct-1M)
11
  # ---------------------------------------
@@ -208,11 +209,10 @@ state = VisitorState(
208
  )
209
  # Execute workflow
210
  #result = compiled_graph.invoke(state.dict())
211
- result = compiled_graph.invoke(state.model_dump())
212
- print(state)
213
- print(result)
214
 
215
- """
216
  # ---------------------------------------
217
  # Step 6: Gradio Interface
218
  # ---------------------------------------
@@ -227,7 +227,8 @@ def gradio_interface(visitor_name, visitor_mobile, visitor_email, doctor_name, d
227
  department_name=department_name,
228
  )
229
  # Execute workflow
230
- result = compiled_graph.invoke(state.dict())
 
231
  return "\n".join(result["messages"])
232
 
233
  iface = gr.Interface(
@@ -245,7 +246,9 @@ iface = gr.Interface(
245
  # Execute the Gradio interface
246
  if __name__ == "__main__":
247
  iface.launch(ssr=False)
248
- """
 
 
249
 
250
  """
251
  import gradio as gr
 
6
  from pydantic import BaseModel
7
  import gradio as gr
8
 
9
+
10
  # ---------------------------------------
11
  # Step 1: Define Hugging Face LLM (Qwen/Qwen2.5-7B-Instruct-1M)
12
  # ---------------------------------------
 
209
  )
210
  # Execute workflow
211
  #result = compiled_graph.invoke(state.dict())
212
+ #result = compiled_graph.invoke(state.model_dump())
213
+
214
+
215
 
 
216
  # ---------------------------------------
217
  # Step 6: Gradio Interface
218
  # ---------------------------------------
 
227
  department_name=department_name,
228
  )
229
  # Execute workflow
230
+ #result = compiled_graph.invoke(state.dict())
231
+ result = compiled_graph.invoke(state.model_dump())
232
  return "\n".join(result["messages"])
233
 
234
  iface = gr.Interface(
 
246
  # Execute the Gradio interface
247
  if __name__ == "__main__":
248
  iface.launch(ssr=False)
249
+
250
+ print(state)
251
+ print(result)
252
 
253
  """
254
  import gradio as gr