Spaces:
Running
on
Zero
Running
on
Zero
Refactor app.py and add GPU support for generate function
Browse files
app.py
CHANGED
@@ -1,7 +1,13 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from gradio_rerun import Rerun
|
3 |
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
def display_rrd(file):
|
6 |
return None if file is None else file.name
|
7 |
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
from gradio_rerun import Rerun
|
4 |
|
5 |
|
6 |
+
@spaces.GPU
|
7 |
+
def generate():
|
8 |
+
pass
|
9 |
+
|
10 |
+
|
11 |
def display_rrd(file):
|
12 |
return None if file is None else file.name
|
13 |
|