Spaces:
Sleeping
Sleeping
Update app.py
Browse filesImport modules and classes from openai and smolagents
Create API keys
app.py
CHANGED
|
@@ -4,6 +4,14 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# (Keep Constants as is)
|
| 8 |
# --- Constants ---
|
| 9 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
+
# Import modules and classes from openai and smolagents
|
| 8 |
+
import openai
|
| 9 |
+
from smolagents import CodeAgent, OpenAIServerModel, GoogleSearchTool, VisitWebpageTool, PythonInterpreterTool, SpeechToTextTool
|
| 10 |
+
|
| 11 |
+
# Create API keys
|
| 12 |
+
openai.api_key = ('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')
|
| 13 |
+
GoogleSearch.SERP_API_KEY = 'a2fa0feab384c372147075f190fe5878300bbbb693eb0aced535e5d58189ad70'
|
| 14 |
+
|
| 15 |
# (Keep Constants as is)
|
| 16 |
# --- Constants ---
|
| 17 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|