Spaces:
Running
Running
remove token variable invocation
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import os
|
| 2 |
-
from dotenv import load_dotenv
|
| 3 |
import gradio as gr
|
| 4 |
from sqlalchemy import text
|
| 5 |
from smolagents import tool, CodeAgent, HfApiModel
|
|
@@ -9,11 +9,11 @@ import spaces
|
|
| 9 |
from database import engine, receipts
|
| 10 |
|
| 11 |
# Load Hugging Face API token
|
| 12 |
-
load_dotenv(override=True)
|
| 13 |
-
hf_token = os.getenv("HF_TOKEN")
|
| 14 |
|
| 15 |
-
if not hf_token:
|
| 16 |
-
raise ValueError("HF_TOKEN environment variable is not set.")
|
| 17 |
|
| 18 |
@tool
|
| 19 |
def sql_engine(query: str) -> str:
|
|
|
|
| 1 |
import os
|
| 2 |
+
# from dotenv import load_dotenv
|
| 3 |
import gradio as gr
|
| 4 |
from sqlalchemy import text
|
| 5 |
from smolagents import tool, CodeAgent, HfApiModel
|
|
|
|
| 9 |
from database import engine, receipts
|
| 10 |
|
| 11 |
# Load Hugging Face API token
|
| 12 |
+
# load_dotenv(override=True)
|
| 13 |
+
# hf_token = os.getenv("HF_TOKEN")
|
| 14 |
|
| 15 |
+
# if not hf_token:
|
| 16 |
+
# raise ValueError("HF_TOKEN environment variable is not set.")
|
| 17 |
|
| 18 |
@tool
|
| 19 |
def sql_engine(query: str) -> str:
|