Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
import time
|
|
|
|
| 7 |
from smolagents import TransformersModel, DuckDuckGoSearchTool, CodeAgent, LiteLLMModel
|
| 8 |
|
| 9 |
|
|
@@ -43,9 +44,10 @@ class BasicAgent:
|
|
| 43 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 44 |
try:
|
| 45 |
answer = self.agent.run(question)
|
| 46 |
-
print(f"Agent returning the answer: {answer}")
|
| 47 |
except:
|
| 48 |
time.sleep(5)
|
|
|
|
|
|
|
| 49 |
return answer
|
| 50 |
|
| 51 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
import time
|
| 7 |
+
import vertex_ai
|
| 8 |
from smolagents import TransformersModel, DuckDuckGoSearchTool, CodeAgent, LiteLLMModel
|
| 9 |
|
| 10 |
|
|
|
|
| 44 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 45 |
try:
|
| 46 |
answer = self.agent.run(question)
|
|
|
|
| 47 |
except:
|
| 48 |
time.sleep(5)
|
| 49 |
+
answer = self.agent.run(question)
|
| 50 |
+
print(f"Agent returning the answer: {answer}")
|
| 51 |
return answer
|
| 52 |
|
| 53 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|