Cmuroc27 commited on
Commit
ce06eb3
·
1 Parent(s): 3d6a2f8
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import os
2
  import gradio as gr
3
  import asyncio
@@ -45,6 +46,7 @@ class BasicAgent:
45
 
46
  def __call__(self, question: str, file_name: str = None) -> str:
47
  print(f"Agent received question: {question[:50]}...")
 
48
 
49
  try:
50
  if file_name:
@@ -53,7 +55,7 @@ class BasicAgent:
53
  full_question = question
54
 
55
  answer = asyncio.run(
56
- (asyncio.wait_for(self.agent.run(question), timeout=60.0)))
57
 
58
  print(f" Final answer is : {answer[:60]}...")
59
  return answer
 
1
+ import tempfile
2
  import os
3
  import gradio as gr
4
  import asyncio
 
46
 
47
  def __call__(self, question: str, file_name: str = None) -> str:
48
  print(f"Agent received question: {question[:50]}...")
49
+
50
 
51
  try:
52
  if file_name:
 
55
  full_question = question
56
 
57
  answer = asyncio.run(
58
+ (asyncio.wait_for(self.agent.run(full_question), timeout=60.0)))
59
 
60
  print(f" Final answer is : {answer[:60]}...")
61
  return answer