idoyaaran commited on
Commit
3402b72
·
verified ·
1 Parent(s): 7c7e5f8

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +8 -0
  2. requirements.txt +1 -0
app.py CHANGED
@@ -17,6 +17,14 @@ from huggingface_hub import hf_hub_download, InferenceClient
17
  import faiss
18
  from sentence_transformers import SentenceTransformer
19
 
 
 
 
 
 
 
 
 
20
  # ---------------- config ----------------
21
  DATA_OWNER = "idoyaaran" # public dataset + artifacts live here
22
  DATASET_REPO = f"{DATA_OWNER}/mise-recipes"
 
17
  import faiss
18
  from sentence_transformers import SentenceTransformer
19
 
20
+ # ZeroGPU requires at least one @spaces.GPU function to exist. Our text/image
21
+ # generation uses the Inference API (no GPU), so this is just a tiny stub to
22
+ # satisfy that requirement — it does not consume the ZeroGPU quota in normal use.
23
+ import spaces
24
+ @spaces.GPU(duration=1)
25
+ def _gpu_stub():
26
+ return True
27
+
28
  # ---------------- config ----------------
29
  DATA_OWNER = "idoyaaran" # public dataset + artifacts live here
30
  DATASET_REPO = f"{DATA_OWNER}/mise-recipes"
requirements.txt CHANGED
@@ -1,3 +1,4 @@
 
1
  sentence-transformers
2
  faiss-cpu
3
  huggingface_hub==0.25.2
 
1
+ spaces
2
  sentence-transformers
3
  faiss-cpu
4
  huggingface_hub==0.25.2