Update app.py
Browse files
app.py
CHANGED
|
@@ -256,18 +256,17 @@ with gr.Blocks(title="HTML Viewer & Gemini 2.5 Flash Demo", theme=gr.themes.Base
|
|
| 256 |
trim_cb = gr.Checkbox(value=True, label="余白を自動トリミング")
|
| 257 |
out_img = gr.Image(type="pil", label="スクリーンショット")
|
| 258 |
gen_btn = gr.Button("生成")
|
| 259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
def toggle(mode):
|
| 261 |
show = mode == "テキスト入力"
|
| 262 |
return [{"visible": show, "__type__": "update"}, {"visible": show, "__type__": "update"}]
|
| 263 |
input_mode.change(toggle, input_mode, [temp_slider, style_dd])
|
| 264 |
gen_btn.click(process_input, [input_mode, input_text, ext_slider, temp_slider, trim_cb, style_dd], out_img)
|
| 265 |
|
| 266 |
-
iface.markdown(f"""
|
| 267 |
-
**使用モデル**: `{os.environ.get("GEMINI_MODEL", "gemini-1.5-pro")}`
|
| 268 |
-
**API**: `/api/screenshot`, `/api/text-to-screenshot`
|
| 269 |
-
""")
|
| 270 |
-
|
| 271 |
app = gr.mount_gradio_app(app, iface, path="/")
|
| 272 |
|
| 273 |
if __name__ == "__main__":
|
|
|
|
| 256 |
trim_cb = gr.Checkbox(value=True, label="余白を自動トリミング")
|
| 257 |
out_img = gr.Image(type="pil", label="スクリーンショット")
|
| 258 |
gen_btn = gr.Button("生成")
|
| 259 |
+
gr.Markdown(f"""
|
| 260 |
+
**使用モデル**: `{os.environ.get("GEMINI_MODEL", "gemini-1.5-pro")}`
|
| 261 |
+
**API**: `/api/screenshot`, `/api/text-to-screenshot`
|
| 262 |
+
""")
|
| 263 |
+
|
| 264 |
def toggle(mode):
|
| 265 |
show = mode == "テキスト入力"
|
| 266 |
return [{"visible": show, "__type__": "update"}, {"visible": show, "__type__": "update"}]
|
| 267 |
input_mode.change(toggle, input_mode, [temp_slider, style_dd])
|
| 268 |
gen_btn.click(process_input, [input_mode, input_text, ext_slider, temp_slider, trim_cb, style_dd], out_img)
|
| 269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
app = gr.mount_gradio_app(app, iface, path="/")
|
| 271 |
|
| 272 |
if __name__ == "__main__":
|