Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def generate_image(prompt: str, model_name: str):
|
|
33 |
with open(image_path, "wb") as f:
|
34 |
f.write(image_data)
|
35 |
|
36 |
-
time.sleep(10) # 10-
|
37 |
return image_path
|
38 |
else:
|
39 |
return f"Error generating image: {response.text}"
|
@@ -64,22 +64,21 @@ def generate_and_upload(prompt: str, model_name: str, api_key: str):
|
|
64 |
# Gradio UI
|
65 |
with gr.Blocks(theme='NoCrypt/miku') as app:
|
66 |
gr.HTML(
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
)
|
81 |
-
|
82 |
-
gr.Markdown("<hr style='color: red;'>")
|
83 |
with gr.Row():
|
84 |
prompt_input = gr.Textbox(label="Enter a prompt:", placeholder="A futuristic spaceship...")
|
85 |
model_input = gr.Textbox(label="Enter model name:", placeholder="stabilityai/stable-diffusion-3.5-large")
|
@@ -94,19 +93,14 @@ with gr.Blocks(theme='NoCrypt/miku') as app:
|
|
94 |
inputs=[prompt_input, model_input, api_key_input],
|
95 |
outputs=[image_output, url_output]
|
96 |
)
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
<hr style='color: red;'>
|
108 |
-
<h1 class='centered-title' ♥ Made by Tasia with Heart ♥</h1>
|
109 |
-
<hr style='color: red;'>
|
110 |
-
"""
|
111 |
-
)
|
112 |
app.launch(server_port=7860)
|
|
|
33 |
with open(image_path, "wb") as f:
|
34 |
f.write(image_data)
|
35 |
|
36 |
+
time.sleep(10) # 10-second delay
|
37 |
return image_path
|
38 |
else:
|
39 |
return f"Error generating image: {response.text}"
|
|
|
64 |
# Gradio UI
|
65 |
with gr.Blocks(theme='NoCrypt/miku') as app:
|
66 |
gr.HTML(
|
67 |
+
"""
|
68 |
+
<style>
|
69 |
+
.centered-title {
|
70 |
+
text-align: center;
|
71 |
+
color: red;
|
72 |
+
font-size: 24px;
|
73 |
+
font-weight: bold;
|
74 |
+
}
|
75 |
+
</style>
|
76 |
+
<hr style='color: red;'>
|
77 |
+
<h1 class='centered-title'>♥ Tasia API on Marty Space ♥</h1>
|
78 |
+
<hr style='color: red;'>
|
79 |
+
"""
|
80 |
+
)
|
81 |
+
|
|
|
82 |
with gr.Row():
|
83 |
prompt_input = gr.Textbox(label="Enter a prompt:", placeholder="A futuristic spaceship...")
|
84 |
model_input = gr.Textbox(label="Enter model name:", placeholder="stabilityai/stable-diffusion-3.5-large")
|
|
|
93 |
inputs=[prompt_input, model_input, api_key_input],
|
94 |
outputs=[image_output, url_output]
|
95 |
)
|
96 |
+
|
97 |
+
# Footer
|
98 |
+
gr.HTML(
|
99 |
+
"""
|
100 |
+
<hr style='color: red;'>
|
101 |
+
<h1 style='text-align: center; color: red; font-size: 20px; font-weight: bold;'>♥ Made by Tasia with ♥</h1>
|
102 |
+
<hr style='color: red;'>
|
103 |
+
"""
|
104 |
+
)
|
105 |
+
|
|
|
|
|
|
|
|
|
|
|
106 |
app.launch(server_port=7860)
|