Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import json
|
| 2 |
import os
|
|
|
|
| 3 |
import torch
|
| 4 |
import gradio as gr
|
| 5 |
|
|
@@ -46,7 +47,7 @@ os.makedirs("outputs", exist_ok=True)
|
|
| 46 |
# -----------------------
|
| 47 |
# Fonction de génération
|
| 48 |
# -----------------------
|
| 49 |
-
|
| 50 |
def generate(
|
| 51 |
prompt: str,
|
| 52 |
negative_prompt: str,
|
|
|
|
| 1 |
import json
|
| 2 |
import os
|
| 3 |
+
import spaces
|
| 4 |
import torch
|
| 5 |
import gradio as gr
|
| 6 |
|
|
|
|
| 47 |
# -----------------------
|
| 48 |
# Fonction de génération
|
| 49 |
# -----------------------
|
| 50 |
+
@spaces.GPU()
|
| 51 |
def generate(
|
| 52 |
prompt: str,
|
| 53 |
negative_prompt: str,
|