dromerosm commited on
Commit
71a5205
·
verified ·
1 Parent(s): 6d061d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -88,7 +88,7 @@ def web_scrapper(url: str, topic: str) -> str:
88
 
89
  return summary_response
90
 
91
- def kickoff_crew(topic: str) -> dict:
92
  try:
93
 
94
  # Initialize the large language models
@@ -180,6 +180,8 @@ def kickoff_crew(topic: str) -> dict:
180
 
181
  # Kick-off the research process
182
  result = crew.kickoff(inputs={'topic': topic})
 
 
183
  return result
184
  except Exception as e:
185
  return f"Error: {str(e)}"
@@ -201,5 +203,5 @@ def main():
201
  # demo.launch(debug=True)
202
  demo.queue(api_open=False, max_size=3).launch()
203
 
204
- if __name__ == "__main__":
205
  main()
 
88
 
89
  return summary_response
90
 
91
+ def kickoff_crew(topic: str) -> str:
92
  try:
93
 
94
  # Initialize the large language models
 
180
 
181
  # Kick-off the research process
182
  result = crew.kickoff(inputs={'topic': topic})
183
+ if not isinstance(result, str):
184
+ result = str(result)
185
  return result
186
  except Exception as e:
187
  return f"Error: {str(e)}"
 
203
  # demo.launch(debug=True)
204
  demo.queue(api_open=False, max_size=3).launch()
205
 
206
+ if __name__="__main__":
207
  main()