Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -12,6 +12,7 @@ from pathlib import Path
|
|
| 12 |
from typing import Any
|
| 13 |
|
| 14 |
import gradio as gr
|
|
|
|
| 15 |
|
| 16 |
# --- Config ---
|
| 17 |
|
|
@@ -167,6 +168,7 @@ def retrieve_context(source_code: str, n_results: int = 3) -> str:
|
|
| 167 |
# --- Inference ---
|
| 168 |
|
| 169 |
|
|
|
|
| 170 |
def generate_spec(
|
| 171 |
source_code: str,
|
| 172 |
temperature: float = 0.7,
|
|
|
|
| 12 |
from typing import Any
|
| 13 |
|
| 14 |
import gradio as gr
|
| 15 |
+
import spaces
|
| 16 |
|
| 17 |
# --- Config ---
|
| 18 |
|
|
|
|
| 168 |
# --- Inference ---
|
| 169 |
|
| 170 |
|
| 171 |
+
@spaces.GPU
|
| 172 |
def generate_spec(
|
| 173 |
source_code: str,
|
| 174 |
temperature: float = 0.7,
|