Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,12 +6,6 @@ import sys
|
|
| 6 |
import time
|
| 7 |
from inferencer import Inferencer
|
| 8 |
from accelerate.utils import set_seed
|
| 9 |
-
|
| 10 |
-
# sys.path.append("/mnt/data_vlm/chris/Harmon")
|
| 11 |
-
|
| 12 |
-
# model_path = "/mnt/data_vlm/chris/Harmon/work_dirs/sft_stage4_mar_huge_lr_7e-6_edit_mainly_new_mar_few_steps_gpt_only_and_1024/500iters_hf/pytorch_model.bin"
|
| 13 |
-
# ckpt_name = "/".join(model_path.split("/")[-3:])
|
| 14 |
-
#model_path = "Skywork/Skywork-UniPic-1.5B"
|
| 15 |
from huggingface_hub import snapshot_download
|
| 16 |
|
| 17 |
model_dir = snapshot_download(repo_id="Skywork/Skywork-UniPic-1.5B")
|
|
@@ -207,7 +201,7 @@ with gr.Blocks(css=CSS) as demo:
|
|
| 207 |
mode_state = gr.State(value="Understand Image")
|
| 208 |
|
| 209 |
with gr.Tabs():
|
| 210 |
-
with gr.Tab(
|
| 211 |
chatbot = gr.Chatbot(
|
| 212 |
elem_id="chatbot1",
|
| 213 |
show_label=False,
|
|
@@ -219,7 +213,7 @@ with gr.Blocks(css=CSS) as demo:
|
|
| 219 |
with gr.Row():
|
| 220 |
mode_selector = gr.Radio(
|
| 221 |
choices=["Generate Image","Edit Image","Understand Image"],
|
| 222 |
-
value="
|
| 223 |
label="Mode",
|
| 224 |
interactive=True,
|
| 225 |
)
|
|
|
|
| 6 |
import time
|
| 7 |
from inferencer import Inferencer
|
| 8 |
from accelerate.utils import set_seed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
from huggingface_hub import snapshot_download
|
| 10 |
|
| 11 |
model_dir = snapshot_download(repo_id="Skywork/Skywork-UniPic-1.5B")
|
|
|
|
| 201 |
mode_state = gr.State(value="Understand Image")
|
| 202 |
|
| 203 |
with gr.Tabs():
|
| 204 |
+
with gr.Tab("Skywork UniPic Chatbot", elem_id="tab_item_4"):
|
| 205 |
chatbot = gr.Chatbot(
|
| 206 |
elem_id="chatbot1",
|
| 207 |
show_label=False,
|
|
|
|
| 213 |
with gr.Row():
|
| 214 |
mode_selector = gr.Radio(
|
| 215 |
choices=["Generate Image","Edit Image","Understand Image"],
|
| 216 |
+
value="Generate Image",
|
| 217 |
label="Mode",
|
| 218 |
interactive=True,
|
| 219 |
)
|