fix generate_handwriting input
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ model = None
|
|
| 22 |
|
| 23 |
def load_model(model_name="imuru_t5_small"):
|
| 24 |
global model
|
| 25 |
-
|
| 26 |
if model is None:
|
| 27 |
print(f"Loading model {model_name}...")
|
| 28 |
from transformers import AutoModel
|
|
@@ -172,13 +172,13 @@ with gr.Blocks(css=custom_css, title="Imuru") as demo:
|
|
| 172 |
# Connect events
|
| 173 |
generate_btn.click(
|
| 174 |
fn=generate_handwriting,
|
| 175 |
-
inputs=[
|
| 176 |
outputs=[output_image, status_text]
|
| 177 |
)
|
| 178 |
|
| 179 |
gen_text_input.submit(
|
| 180 |
fn=generate_handwriting,
|
| 181 |
-
inputs=[
|
| 182 |
outputs=[output_image, status_text]
|
| 183 |
)
|
| 184 |
|
|
|
|
| 22 |
|
| 23 |
def load_model(model_name="imuru_t5_small"):
|
| 24 |
global model
|
| 25 |
+
|
| 26 |
if model is None:
|
| 27 |
print(f"Loading model {model_name}...")
|
| 28 |
from transformers import AutoModel
|
|
|
|
| 172 |
# Connect events
|
| 173 |
generate_btn.click(
|
| 174 |
fn=generate_handwriting,
|
| 175 |
+
inputs=[style_image_input, gen_text_input, model_selector],
|
| 176 |
outputs=[output_image, status_text]
|
| 177 |
)
|
| 178 |
|
| 179 |
gen_text_input.submit(
|
| 180 |
fn=generate_handwriting,
|
| 181 |
+
inputs=[style_image_input, gen_text_input, model_selector],
|
| 182 |
outputs=[output_image, status_text]
|
| 183 |
)
|
| 184 |
|