Spaces:
Running
on
Zero
Running
on
Zero
Adding spaces GPU decorator
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
import torch
|
|
@@ -344,6 +345,7 @@ except Exception as e:
|
|
| 344 |
|
| 345 |
# --- Main Processing Function ---
|
| 346 |
|
|
|
|
| 347 |
def process_text(prompt: str) -> Tuple[
|
| 348 |
Optional[matplotlib.figure.Figure], List[Tuple[str, str]], int, # BLT
|
| 349 |
List[Tuple[str, str]], int, # Tiktoken
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import os
|
| 3 |
import gradio as gr
|
| 4 |
import torch
|
|
|
|
| 345 |
|
| 346 |
# --- Main Processing Function ---
|
| 347 |
|
| 348 |
+
@spaces.GPU
|
| 349 |
def process_text(prompt: str) -> Tuple[
|
| 350 |
Optional[matplotlib.figure.Figure], List[Tuple[str, str]], int, # BLT
|
| 351 |
List[Tuple[str, str]], int, # Tiktoken
|