Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,6 @@ from optimum.intel.openvino.modeling_diffusion import OVModelVaeDecoder, OVBaseM
|
|
19 |
|
20 |
import os
|
21 |
from tqdm import tqdm
|
22 |
-
import gradio_user_history as gr_user_history
|
23 |
|
24 |
from concurrent.futures import ThreadPoolExecutor
|
25 |
import uuid
|
@@ -64,7 +63,6 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
64 |
def save_image(img, profile: gr.OAuthProfile | None, metadata: dict):
|
65 |
unique_name = str(uuid.uuid4()) + '.png'
|
66 |
img.save(unique_name)
|
67 |
-
gr_user_history.save_image(label=metadata["prompt"], image=img, profile=profile, metadata=metadata)
|
68 |
return unique_name
|
69 |
|
70 |
def save_images(image_array, profile: gr.OAuthProfile | None, metadata: dict):
|
@@ -155,9 +153,6 @@ with gr.Blocks(css="style.css") as demo:
|
|
155 |
step=1,
|
156 |
value=4,
|
157 |
)
|
158 |
-
|
159 |
-
#with gr.Accordion("Past generations", open=False):
|
160 |
-
#gr_user_history.render()
|
161 |
|
162 |
gr.Examples(
|
163 |
examples=examples,
|
|
|
19 |
|
20 |
import os
|
21 |
from tqdm import tqdm
|
|
|
22 |
|
23 |
from concurrent.futures import ThreadPoolExecutor
|
24 |
import uuid
|
|
|
63 |
def save_image(img, profile: gr.OAuthProfile | None, metadata: dict):
|
64 |
unique_name = str(uuid.uuid4()) + '.png'
|
65 |
img.save(unique_name)
|
|
|
66 |
return unique_name
|
67 |
|
68 |
def save_images(image_array, profile: gr.OAuthProfile | None, metadata: dict):
|
|
|
153 |
step=1,
|
154 |
value=4,
|
155 |
)
|
|
|
|
|
|
|
156 |
|
157 |
gr.Examples(
|
158 |
examples=examples,
|