Update app.py
Browse files
app.py
CHANGED
@@ -26,13 +26,7 @@ Mistralclient = Mistral(api_key=api_key)
|
|
26 |
|
27 |
def clear():
|
28 |
return None
|
29 |
-
|
30 |
-
def pbar(x, progress=gr.Progress()):
|
31 |
-
progress(0, desc="Starting...")
|
32 |
-
time.sleep(1)
|
33 |
-
for i in progress.tqdm(range(100)):
|
34 |
-
time.sleep(0.1)
|
35 |
-
return x
|
36 |
|
37 |
# Function to query the API and return the generated image
|
38 |
def query(prompt, is_negative=False, steps=35, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=896, height=1152):
|
@@ -205,7 +199,7 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
205 |
clear_results.click(lambda: (None), None, [image_output], queue=False, show_api=False)
|
206 |
|
207 |
# Bind the button to the query function with the added width and height inputs
|
208 |
-
text_button.click(query,
|
209 |
|
210 |
with gr.TabItem(label="Image To Prompt", visible=True):
|
211 |
with gr.Row():
|
|
|
26 |
|
27 |
def clear():
|
28 |
return None
|
29 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
# Function to query the API and return the generated image
|
32 |
def query(prompt, is_negative=False, steps=35, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=896, height=1152):
|
|
|
199 |
clear_results.click(lambda: (None), None, [image_output], queue=False, show_api=False)
|
200 |
|
201 |
# Bind the button to the query function with the added width and height inputs
|
202 |
+
text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
|
203 |
|
204 |
with gr.TabItem(label="Image To Prompt", visible=True):
|
205 |
with gr.Row():
|