Spaces:
Sleeping
Sleeping
specify gpu duration
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ def make_prompt(model):
|
|
72 |
prompt = prompts.get(model, "")
|
73 |
return prompt
|
74 |
|
75 |
-
@spaces.GPU
|
76 |
def make_image(model, prompt):
|
77 |
"""
|
78 |
Generates an image based on the given model and prompt.
|
@@ -162,4 +162,4 @@ Brazil XL is an iniative that brings better representations of Brazilian culture
|
|
162 |
model_dropdown.change(fn=make_prompt, inputs=model_dropdown, outputs=prompt)
|
163 |
btn.click(fn=make_image, inputs=[model_dropdown, prompt], outputs=output)
|
164 |
|
165 |
-
demo.launch()
|
|
|
72 |
prompt = prompts.get(model, "")
|
73 |
return prompt
|
74 |
|
75 |
+
@spaces.GPU(duration=120)
|
76 |
def make_image(model, prompt):
|
77 |
"""
|
78 |
Generates an image based on the given model and prompt.
|
|
|
162 |
model_dropdown.change(fn=make_prompt, inputs=model_dropdown, outputs=prompt)
|
163 |
btn.click(fn=make_image, inputs=[model_dropdown, prompt], outputs=output)
|
164 |
|
165 |
+
demo.launch(debug=True)
|