Yet another try.
Browse files
app.py
CHANGED
|
@@ -410,16 +410,16 @@ with gradio.Blocks() as gui:
|
|
| 410 |
# gradio.Markdown('## Output')
|
| 411 |
# with gradio.Row():
|
| 412 |
|
|
|
|
| 413 |
outputGallery = gradio.Gallery(label = 'output',
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
outputGallery.select(select)
|
| 420 |
|
| 421 |
-
|
| 422 |
-
# with gradio.Row():
|
| 423 |
analysisOutput = gradio.Plot()
|
| 424 |
|
| 425 |
# ====== Add click event handling for "Generate" button ==================
|
|
@@ -429,13 +429,13 @@ with gradio.Blocks() as gui:
|
|
| 429 |
dropdownType,
|
| 430 |
dropdownGeneratorModel ],
|
| 431 |
outputs = [ outputGallery ]
|
| 432 |
-
|
| 433 |
|
| 434 |
# ====== Add click event handling for "Analyze" button ===================
|
| 435 |
buttonAnalyze.click(analyze,
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
|
| 440 |
# ====== Add click event handling for download buttons ===================
|
| 441 |
# Using hidden button and JavaScript, to generate download file on-the-fly:
|
|
|
|
| 410 |
# gradio.Markdown('## Output')
|
| 411 |
# with gradio.Row():
|
| 412 |
|
| 413 |
+
# with gradio.Row():
|
| 414 |
outputGallery = gradio.Gallery(label = 'output',
|
| 415 |
+
columns = [ 1 ],
|
| 416 |
+
height = 'auto',
|
| 417 |
+
object_fit = 'scale_down', # !!! <<<---
|
| 418 |
+
show_label = True,
|
| 419 |
+
preview = True)
|
| 420 |
outputGallery.select(select)
|
| 421 |
|
| 422 |
+
# gradio.Markdown('## Analysis')
|
|
|
|
| 423 |
analysisOutput = gradio.Plot()
|
| 424 |
|
| 425 |
# ====== Add click event handling for "Generate" button ==================
|
|
|
|
| 429 |
dropdownType,
|
| 430 |
dropdownGeneratorModel ],
|
| 431 |
outputs = [ outputGallery ]
|
| 432 |
+
)
|
| 433 |
|
| 434 |
# ====== Add click event handling for "Analyze" button ===================
|
| 435 |
buttonAnalyze.click(analyze,
|
| 436 |
+
inputs = [ ],
|
| 437 |
+
outputs = [ analysisOutput ]
|
| 438 |
+
)
|
| 439 |
|
| 440 |
# ====== Add click event handling for download buttons ===================
|
| 441 |
# Using hidden button and JavaScript, to generate download file on-the-fly:
|