Spaces:
Running
on
Zero
Running
on
Zero
jedick
commited on
Commit
·
ef0d090
1
Parent(s):
feb987c
Add ZeroGPU support
Browse files- app.py +2 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -8,6 +8,7 @@ import json
|
|
8 |
from datetime import datetime
|
9 |
from pathlib import Path
|
10 |
from uuid import uuid4
|
|
|
11 |
|
12 |
|
13 |
def is_running_in_hf_spaces():
|
@@ -254,6 +255,7 @@ with gr.Blocks(theme=my_theme, css=custom_css, head=font_awesome_html) as demo:
|
|
254 |
|
255 |
# Functions
|
256 |
|
|
|
257 |
def query_model(claim, evidence):
|
258 |
"""
|
259 |
Get prediction for a claim and evidence pair
|
|
|
8 |
from datetime import datetime
|
9 |
from pathlib import Path
|
10 |
from uuid import uuid4
|
11 |
+
import spaces
|
12 |
|
13 |
|
14 |
def is_running_in_hf_spaces():
|
|
|
255 |
|
256 |
# Functions
|
257 |
|
258 |
+
@spaces.GPU(duration=10)
|
259 |
def query_model(claim, evidence):
|
260 |
"""
|
261 |
Get prediction for a claim and evidence pair
|
requirements.txt
CHANGED
@@ -6,4 +6,5 @@ pymupdf
|
|
6 |
unidecode
|
7 |
nltk
|
8 |
bm25s
|
9 |
-
|
|
|
|
6 |
unidecode
|
7 |
nltk
|
8 |
bm25s
|
9 |
+
huggingface_hub
|
10 |
+
spaces
|