ZennyKenny commited on
Commit
4f04c00
·
verified ·
1 Parent(s): 0380e03

add GPU decorator

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -3,6 +3,7 @@ from dotenv import load_dotenv
3
  import gradio as gr
4
  from sqlalchemy import text
5
  from smolagents import tool, CodeAgent, HfApiModel
 
6
 
7
  # Import the database setup from database.py
8
  from database import engine, receipts
@@ -12,6 +13,7 @@ load_dotenv(override=True)
12
  hf_token = os.getenv("HF_TOKEN")
13
 
14
  # SQL Execution function
 
15
  @tool
16
  def sql_engine(query: str) -> str:
17
  """
 
3
  import gradio as gr
4
  from sqlalchemy import text
5
  from smolagents import tool, CodeAgent, HfApiModel
6
+ import spaces
7
 
8
  # Import the database setup from database.py
9
  from database import engine, receipts
 
13
  hf_token = os.getenv("HF_TOKEN")
14
 
15
  # SQL Execution function
16
+ @spaces.GPU
17
  @tool
18
  def sql_engine(query: str) -> str:
19
  """