Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,9 +7,9 @@ import traceback
|
|
7 |
import random
|
8 |
import time
|
9 |
|
10 |
-
|
11 |
-
"hsuwill000/LCM_SoteMix_OpenVINO_CPU_Space_TAESD",
|
12 |
-
"HelloSun/LCM_Dreamshaper_v7-int8-ov"
|
13 |
]
|
14 |
|
15 |
# Counter for image filenames to avoid overwriting
|
@@ -20,7 +20,9 @@ def infer_gradio(prompt: str):
|
|
20 |
global count
|
21 |
random.seed(time.time())
|
22 |
# Create a Client instance to communicate with the Hugging Face space
|
23 |
-
|
|
|
|
|
24 |
|
25 |
# Prepare the inputs for the prediction
|
26 |
inputs = {
|
@@ -75,4 +77,4 @@ with gr.Blocks() as demo:
|
|
75 |
# Connecting the button click to the image generation function
|
76 |
run_button.click(infer_gradio, inputs=prompt_input, outputs=output_image)
|
77 |
|
78 |
-
demo.launch()
|
|
|
7 |
import random
|
8 |
import time
|
9 |
|
10 |
+
clients = [
|
11 |
+
Client("hsuwill000/LCM_SoteMix_OpenVINO_CPU_Space_TAESD") ,
|
12 |
+
Client("HelloSun/LCM_Dreamshaper_v7-int8-ov")
|
13 |
]
|
14 |
|
15 |
# Counter for image filenames to avoid overwriting
|
|
|
20 |
global count
|
21 |
random.seed(time.time())
|
22 |
# Create a Client instance to communicate with the Hugging Face space
|
23 |
+
#client = Client(random.choice(repos))
|
24 |
+
client = random.choice(clients)
|
25 |
+
|
26 |
|
27 |
# Prepare the inputs for the prediction
|
28 |
inputs = {
|
|
|
77 |
# Connecting the button click to the image generation function
|
78 |
run_button.click(infer_gradio, inputs=prompt_input, outputs=output_image)
|
79 |
|
80 |
+
demo.launch()
|