aparnavellala commited on
Commit
af25f05
·
verified ·
1 Parent(s): 6705813

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -6,6 +6,21 @@ from langgraph.graph import StateGraph, END
6
  from pydantic import BaseModel
7
  import gradio as gr
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  # ---------------------------------------
11
  # Step 1: Define Hugging Face LLM (Qwen/Qwen2.5-7B-Instruct-1M)
 
6
  from pydantic import BaseModel
7
  import gradio as gr
8
 
9
+ import os
10
+ if os.environ.get("SPACES_ZERO_GPU") is not None:
11
+ import spaces
12
+ else:
13
+ class spaces:
14
+ @staticmethod
15
+ def GPU(func):
16
+ def wrapper(*args, **kwargs):
17
+ return func(*args, **kwargs)
18
+ return wrapper
19
+
20
+ @spaces.GPU
21
+ def fake_gpu():
22
+ pass
23
+
24
 
25
  # ---------------------------------------
26
  # Step 1: Define Hugging Face LLM (Qwen/Qwen2.5-7B-Instruct-1M)