init
Browse files
app.py
CHANGED
|
@@ -23,7 +23,8 @@ from huggingface_hub import snapshot_download
|
|
| 23 |
import os
|
| 24 |
local_path = snapshot_download(
|
| 25 |
repo_id="KangLiao/Puffin",
|
| 26 |
-
repo_type="model",
|
|
|
|
| 27 |
local_dir="checkpoints/",
|
| 28 |
local_dir_use_symlinks=False,
|
| 29 |
revision="main",
|
|
@@ -201,7 +202,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 201 |
understanding_button = gr.Button("Chat")
|
| 202 |
understanding_output = gr.Textbox(label="Response")
|
| 203 |
|
| 204 |
-
|
| 205 |
|
| 206 |
with gr.Accordion("Advanced options", open=False):
|
| 207 |
und_seed_input = gr.Number(label="Seed", precision=0, value=42)
|
|
@@ -224,7 +225,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 224 |
understanding_button.click(
|
| 225 |
camera_understanding,
|
| 226 |
inputs=[image_input, und_seed_input],
|
| 227 |
-
outputs=[understanding_output,
|
| 228 |
)
|
| 229 |
|
| 230 |
demo.launch(share=True)
|
|
|
|
| 23 |
import os
|
| 24 |
local_path = snapshot_download(
|
| 25 |
repo_id="KangLiao/Puffin",
|
| 26 |
+
repo_type="model",
|
| 27 |
+
filename="Puffin-Base.pth",
|
| 28 |
local_dir="checkpoints/",
|
| 29 |
local_dir_use_symlinks=False,
|
| 30 |
revision="main",
|
|
|
|
| 202 |
understanding_button = gr.Button("Chat")
|
| 203 |
understanding_output = gr.Textbox(label="Response")
|
| 204 |
|
| 205 |
+
camera_output = gr.Gallery(label="Camera Maps", columns=1, rows=1)
|
| 206 |
|
| 207 |
with gr.Accordion("Advanced options", open=False):
|
| 208 |
und_seed_input = gr.Number(label="Seed", precision=0, value=42)
|
|
|
|
| 225 |
understanding_button.click(
|
| 226 |
camera_understanding,
|
| 227 |
inputs=[image_input, und_seed_input],
|
| 228 |
+
outputs=[understanding_output, camera_output]
|
| 229 |
)
|
| 230 |
|
| 231 |
demo.launch(share=True)
|