halfacupoftea commited on
Commit
b5f5dbb
·
1 Parent(s): 13bae54

Fix gradio fn by adding await

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import gradio as gr
2
  from agent.core import run_agent
3
 
4
- def respond_to_issue(issue_url, branch_name):
5
  try:
6
- result = run_agent(issue_url, branch_name)
7
  response = "Agent has successfully processed the issue and posted an update in the comments. Check the GitHub issue for updates."
8
  except Exception as e:
9
  response = f"Something went wrong: {str(e)}"
 
1
  import gradio as gr
2
  from agent.core import run_agent
3
 
4
+ async def respond_to_issue(issue_url, branch_name):
5
  try:
6
+ result = await run_agent(issue_url, branch_name)
7
  response = "Agent has successfully processed the issue and posted an update in the comments. Check the GitHub issue for updates."
8
  except Exception as e:
9
  response = f"Something went wrong: {str(e)}"