matthewfarant commited on
Commit
604c8b2
1 Parent(s): dafe406

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -9,6 +9,11 @@ from firecrawl import FirecrawlApp
9
  import gradio as gr
10
  import os
11
 
 
 
 
 
 
12
  # Initialize LLM and Tools
13
 
14
  # local_llm = 'llama3.1'
@@ -35,6 +40,7 @@ google_search = GoogleSearchAPIWrapper()
35
 
36
  firecrawl_app = FirecrawlApp(api_key=os.getenv('FIRECRAWL_KEY'))
37
 
 
38
  # Query Transformation
39
  query_prompt = PromptTemplate(
40
  template="""
 
9
  import gradio as gr
10
  import os
11
 
12
+ if torch.cuda.is_available():
13
+ device = "cuda:0"
14
+ else:
15
+ device = "cpu"
16
+
17
  # Initialize LLM and Tools
18
 
19
  # local_llm = 'llama3.1'
 
40
 
41
  firecrawl_app = FirecrawlApp(api_key=os.getenv('FIRECRAWL_KEY'))
42
 
43
+ @spaces.GPU
44
  # Query Transformation
45
  query_prompt = PromptTemplate(
46
  template="""