Sreekan commited on
Commit
ed68491
·
verified ·
1 Parent(s): 8586980

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -552,6 +552,7 @@ def payment_state(state: VisitorState):
552
  return {"messages": ["Payment failed due to an error. Please try again later."], "next": END}
553
 
554
  def final_state(state: VisitorState):
 
555
  """FinalState: Send email confirmation and finalize the appointment."""
556
  if state.payment_confirmed:
557
  appointment_details = f"Doctor: {state.doctor_name}\nTime: {state.selected_slot}"
@@ -601,7 +602,7 @@ def gradio_interface(visitor_name, visitor_mobile, visitor_email, doctor_name, d
601
  department_name=department_name,
602
  )
603
  # Execute workflow
604
- result = compiled_graph.invoke(state.dict())
605
  return "\n".join(result["messages"])
606
 
607
  iface = gr.Interface(
 
552
  return {"messages": ["Payment failed due to an error. Please try again later."], "next": END}
553
 
554
  def final_state(state: VisitorState):
555
+ delay(5)
556
  """FinalState: Send email confirmation and finalize the appointment."""
557
  if state.payment_confirmed:
558
  appointment_details = f"Doctor: {state.doctor_name}\nTime: {state.selected_slot}"
 
602
  department_name=department_name,
603
  )
604
  # Execute workflow
605
+ result = compiled_graph.invoke(state.model_dump())
606
  return "\n".join(result["messages"])
607
 
608
  iface = gr.Interface(