Update
Browse files- app.py +20 -3
- requirements.txt +1 -1
- style.css +7 -0
app.py
CHANGED
@@ -36,6 +36,11 @@ app = InferenceUtil(HF_TOKEN)
|
|
36 |
|
37 |
with gr.Blocks(css="style.css") as demo:
|
38 |
gr.Markdown(DESCRIPTION)
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
with gr.Row():
|
41 |
with gr.Column():
|
@@ -187,6 +192,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
187 |
base_model_used_for_training,
|
188 |
prompt_used_for_training,
|
189 |
],
|
|
|
190 |
)
|
191 |
inputs = [
|
192 |
model_id,
|
@@ -197,7 +203,18 @@ with gr.Blocks(css="style.css") as demo:
|
|
197 |
num_steps,
|
198 |
guidance_scale,
|
199 |
]
|
200 |
-
prompt.submit(
|
201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
|
203 |
-
|
|
|
|
36 |
|
37 |
with gr.Blocks(css="style.css") as demo:
|
38 |
gr.Markdown(DESCRIPTION)
|
39 |
+
gr.DuplicateButton(
|
40 |
+
value="Duplicate Space for private use",
|
41 |
+
elem_id="duplicate-button",
|
42 |
+
visible=os.getenv("SHOW_DUPLICATE_BUTTON") == "1",
|
43 |
+
)
|
44 |
|
45 |
with gr.Row():
|
46 |
with gr.Column():
|
|
|
192 |
base_model_used_for_training,
|
193 |
prompt_used_for_training,
|
194 |
],
|
195 |
+
api_name=False,
|
196 |
)
|
197 |
inputs = [
|
198 |
model_id,
|
|
|
203 |
num_steps,
|
204 |
guidance_scale,
|
205 |
]
|
206 |
+
prompt.submit(
|
207 |
+
fn=pipe.run,
|
208 |
+
inputs=inputs,
|
209 |
+
outputs=result,
|
210 |
+
api_name=False,
|
211 |
+
)
|
212 |
+
run_button.click(
|
213 |
+
fn=pipe.run,
|
214 |
+
inputs=inputs,
|
215 |
+
outputs=result,
|
216 |
+
api_name="run",
|
217 |
+
)
|
218 |
|
219 |
+
if __name__ == "__main__":
|
220 |
+
demo.queue(max_size=20).launch()
|
requirements.txt
CHANGED
@@ -4,7 +4,7 @@ decord==0.6.0
|
|
4 |
diffusers[torch]==0.11.1
|
5 |
einops==0.6.1
|
6 |
ftfy==6.1.1
|
7 |
-
gradio==3.
|
8 |
huggingface-hub==0.16.4
|
9 |
imageio==2.31.0
|
10 |
imageio-ffmpeg==0.4.8
|
|
|
4 |
diffusers[torch]==0.11.1
|
5 |
einops==0.6.1
|
6 |
ftfy==6.1.1
|
7 |
+
gradio==3.45.0
|
8 |
huggingface-hub==0.16.4
|
9 |
imageio==2.31.0
|
10 |
imageio-ffmpeg==0.4.8
|
style.css
CHANGED
@@ -1,3 +1,10 @@
|
|
1 |
h1 {
|
2 |
text-align: center;
|
3 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
h1 {
|
2 |
text-align: center;
|
3 |
}
|
4 |
+
|
5 |
+
#duplicate-button {
|
6 |
+
margin: auto;
|
7 |
+
color: #fff;
|
8 |
+
background: #1565c0;
|
9 |
+
border-radius: 100vh;
|
10 |
+
}
|