naveensharma16 commited on
Commit
3e6aa12
·
verified ·
1 Parent(s): b1afde8

Update document-based-assistant/app.py

Browse files
Files changed (1) hide show
  1. document-based-assistant/app.py +15 -4
document-based-assistant/app.py CHANGED
@@ -47,16 +47,27 @@ agent = CodeAgent(
47
  stream_outputs=True
48
  )
49
 
50
- def agent_interface(query):
 
51
  return agent.run(query)
52
 
53
  iface = gr.Interface(
54
- fn=agent_interface,
55
  inputs="text",
56
  outputs="text",
57
  title="Document QA Agent"
58
  )
59
 
60
- # if __name__ == "__main__":
61
- # iface.launch(server_name="0.0.0.0", server_port=7860)
 
 
 
 
 
 
 
 
 
 
62
 
 
47
  stream_outputs=True
48
  )
49
 
50
+ def predict(query: str):
51
+ """GAIA entrypoint"""
52
  return agent.run(query)
53
 
54
  iface = gr.Interface(
55
+ fn=predict,
56
  inputs="text",
57
  outputs="text",
58
  title="Document QA Agent"
59
  )
60
 
61
+ # def agent_interface(query):
62
+ # return agent.run(query)
63
+
64
+ # iface = gr.Interface(
65
+ # fn=agent_interface,
66
+ # inputs="text",
67
+ # outputs="text",
68
+ # title="Document QA Agent"
69
+ # )
70
+
71
+ if __name__ == "__main__":
72
+ iface.launch(server_name="0.0.0.0", server_port=7860)
73