Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ from pathlib import Path
|
|
| 6 |
from typing import Union, Optional
|
| 7 |
|
| 8 |
import openai
|
|
|
|
| 9 |
import requests
|
| 10 |
import gradio as gr
|
| 11 |
import pandas as pd
|
|
@@ -13,7 +14,7 @@ from tabulate import tabulate
|
|
| 13 |
from smolagents import OpenAIServerModel,DuckDuckGoSearchTool,CodeAgent, WikipediaSearchTool
|
| 14 |
from smolagents.tools import PipelineTool, Tool
|
| 15 |
|
| 16 |
-
|
| 17 |
# (Keep Constants as is)
|
| 18 |
# --- Constants ---
|
| 19 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 6 |
from typing import Union, Optional
|
| 7 |
|
| 8 |
import openai
|
| 9 |
+
from openai import OpenAI
|
| 10 |
import requests
|
| 11 |
import gradio as gr
|
| 12 |
import pandas as pd
|
|
|
|
| 14 |
from smolagents import OpenAIServerModel,DuckDuckGoSearchTool,CodeAgent, WikipediaSearchTool
|
| 15 |
from smolagents.tools import PipelineTool, Tool
|
| 16 |
|
| 17 |
+
client = OpenAI(api_key = os.environ.get("OPENAI_API_KEY")
|
| 18 |
# (Keep Constants as is)
|
| 19 |
# --- Constants ---
|
| 20 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|