Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import time
|
|
7 |
from datetime import datetime
|
8 |
from typing import Any
|
9 |
from huggingface_hub import login, hf_hub_download
|
|
|
10 |
|
11 |
import gradio as gr
|
12 |
import numpy as np
|
@@ -90,8 +91,7 @@ def save_generated_image(image, prompt):
|
|
90 |
image.save(filepath)
|
91 |
return filepath
|
92 |
|
93 |
-
|
94 |
-
@gr.GPU(duration=60)
|
95 |
def generate_image(
|
96 |
prompt: str,
|
97 |
seed: int,
|
|
|
7 |
from datetime import datetime
|
8 |
from typing import Any
|
9 |
from huggingface_hub import login, hf_hub_download
|
10 |
+
import spaces
|
11 |
|
12 |
import gradio as gr
|
13 |
import numpy as np
|
|
|
91 |
image.save(filepath)
|
92 |
return filepath
|
93 |
|
94 |
+
@spaces.GPU(duration=60) # gr.GPU 대신 spaces.GPU 사용
|
|
|
95 |
def generate_image(
|
96 |
prompt: str,
|
97 |
seed: int,
|