Spaces:
Sleeping
Sleeping
Remove ZeroGPU wrapper for CPU hardware
Browse files
app.py
CHANGED
|
@@ -3,11 +3,6 @@ from pathlib import Path
|
|
| 3 |
|
| 4 |
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
| 5 |
|
| 6 |
-
try:
|
| 7 |
-
import spaces
|
| 8 |
-
except ImportError:
|
| 9 |
-
spaces = None
|
| 10 |
-
|
| 11 |
from jinja2 import Environment
|
| 12 |
import gradio as gr
|
| 13 |
|
|
@@ -23,12 +18,6 @@ from llm_query.utils import (
|
|
| 23 |
)
|
| 24 |
|
| 25 |
|
| 26 |
-
def zero_gpu(duration: int = 120):
|
| 27 |
-
if spaces is None:
|
| 28 |
-
return lambda function: function
|
| 29 |
-
return spaces.GPU(duration=duration)
|
| 30 |
-
|
| 31 |
-
|
| 32 |
MODEL_NAME = "gpt-5.6-terra"
|
| 33 |
AUX_SYNC_CONFIG_NAME = "config.v0.6.json"
|
| 34 |
SPAN_MARKING_CONFIG_NAME = "config.span_marking.v0.6.json"
|
|
@@ -93,7 +82,6 @@ def empty_tooltips(tokens: tuple[str, ...]) -> tuple[str, ...]:
|
|
| 93 |
return tuple("" for _ in tokens)
|
| 94 |
|
| 95 |
|
| 96 |
-
@zero_gpu(duration=120)
|
| 97 |
def generate_diff(text_a: str, text_b: str):
|
| 98 |
aux_client = get_aux_sync_client()
|
| 99 |
marking_client = get_span_marking_client()
|
|
|
|
| 3 |
|
| 4 |
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
from jinja2 import Environment
|
| 7 |
import gradio as gr
|
| 8 |
|
|
|
|
| 18 |
)
|
| 19 |
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
MODEL_NAME = "gpt-5.6-terra"
|
| 22 |
AUX_SYNC_CONFIG_NAME = "config.v0.6.json"
|
| 23 |
SPAN_MARKING_CONFIG_NAME = "config.span_marking.v0.6.json"
|
|
|
|
| 82 |
return tuple("" for _ in tokens)
|
| 83 |
|
| 84 |
|
|
|
|
| 85 |
def generate_diff(text_a: str, text_b: str):
|
| 86 |
aux_client = get_aux_sync_client()
|
| 87 |
marking_client = get_span_marking_client()
|