Spaces:
Running
on
Zero
Running
on
Zero
jadechoghari
commited on
Commit
β’
445bd13
1
Parent(s):
07c090a
add changes
Browse files- __pycache__/builder.cpython-310.pyc +0 -0
- __pycache__/conversation.cpython-310.pyc +0 -0
- __pycache__/inference.cpython-310.pyc +0 -0
- __pycache__/mm_utils.cpython-310.pyc +0 -0
- __pycache__/model_UI.cpython-310.pyc +0 -0
- app.py +13 -14
- appstore_reminders.png +2 -2
- eval.json +1 -1
- eval_output.jsonl/0_of_1.jsonl +1 -1
__pycache__/builder.cpython-310.pyc
CHANGED
Binary files a/__pycache__/builder.cpython-310.pyc and b/__pycache__/builder.cpython-310.pyc differ
|
|
__pycache__/conversation.cpython-310.pyc
CHANGED
Binary files a/__pycache__/conversation.cpython-310.pyc and b/__pycache__/conversation.cpython-310.pyc differ
|
|
__pycache__/inference.cpython-310.pyc
CHANGED
Binary files a/__pycache__/inference.cpython-310.pyc and b/__pycache__/inference.cpython-310.pyc differ
|
|
__pycache__/mm_utils.cpython-310.pyc
CHANGED
Binary files a/__pycache__/mm_utils.cpython-310.pyc and b/__pycache__/mm_utils.cpython-310.pyc differ
|
|
__pycache__/model_UI.cpython-310.pyc
CHANGED
Binary files a/__pycache__/model_UI.cpython-310.pyc and b/__pycache__/model_UI.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -65,19 +65,18 @@ def submit_chat(chatbot, text_input):
|
|
65 |
def clear_chat():
|
66 |
return [], None, "", "", 0.2, 0.7, 512
|
67 |
|
68 |
-
with open(f"{cur_dir}/logo.svg", "r", encoding="utf-8") as svg_file:
|
69 |
-
|
70 |
-
font_size = "2.5em"
|
71 |
-
svg_content = re.sub(r'(<svg[^>]*)(>)', rf'\1 height="{font_size}" style="vertical-align: middle; display: inline-block;"\2', svg_content)
|
72 |
-
html = f"""
|
73 |
-
<p align="center" style="font-size: {font_size}; line-height: 1;">
|
74 |
-
|
75 |
-
|
76 |
-
</p>
|
77 |
-
<center><font size=3><b>{model_name}</b> Demo: Upload an image, provide a prompt, and get insights using advanced AI models. <a href='https://huggingface.co/jadechoghari/Ferret-UI-Gemma2b'>π Huggingface</a></font></center>
|
78 |
-
"""
|
79 |
-
|
80 |
-
image_data = image_file.read()
|
81 |
# html = f"""
|
82 |
# <p align="center">
|
83 |
# <img src='data:image/png;base64,{image_data.encode("base64").decode("utf-8")}' alt='Ferret-UI' style='width: 100px; vertical-align: middle; border-radius: 15px; box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);'/>
|
@@ -142,7 +141,7 @@ top_p_input = gr.Slider(minimum=0.0, maximum=1.0, step=0.05, value=0.7, label="T
|
|
142 |
max_new_tokens_input = gr.Slider(minimum=1, maximum=1024, step=1, value=512, label="Max New Tokens")
|
143 |
|
144 |
|
145 |
-
chatbot = gr.Chatbot(label="Chat with Ferret-UI", height=400, show_copy_button=True, latex_delimiters=latex_delimiters_set)
|
146 |
|
147 |
with gr.Blocks(title=model_name, theme=gr.themes.Ocean()) as demo:
|
148 |
gr.HTML(html)
|
|
|
65 |
def clear_chat():
|
66 |
return [], None, "", "", 0.2, 0.7, 512
|
67 |
|
68 |
+
# with open(f"{cur_dir}/logo.svg", "r", encoding="utf-8") as svg_file:
|
69 |
+
# svg_content = svg_file.read()
|
70 |
+
# font_size = "2.5em"
|
71 |
+
# svg_content = re.sub(r'(<svg[^>]*)(>)', rf'\1 height="{font_size}" style="vertical-align: middle; display: inline-block;"\2', svg_content)
|
72 |
+
# html = f"""
|
73 |
+
# <p align="center" style="font-size: {font_size}; line-height: 1;">
|
74 |
+
# <span style="display: inline-block; vertical-align: middle;">{svg_content}</span>
|
75 |
+
# <span style="display: inline-block; vertical-align: middle;">{model_name}</span>
|
76 |
+
# </p>
|
77 |
+
# <center><font size=3><b>{model_name}</b> Demo: Upload an image, provide a prompt, and get insights using advanced AI models. <a href='https://huggingface.co/jadechoghari/Ferret-UI-Gemma2b'>π Huggingface</a></font></center>
|
78 |
+
# """
|
79 |
+
|
|
|
80 |
# html = f"""
|
81 |
# <p align="center">
|
82 |
# <img src='data:image/png;base64,{image_data.encode("base64").decode("utf-8")}' alt='Ferret-UI' style='width: 100px; vertical-align: middle; border-radius: 15px; box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);'/>
|
|
|
141 |
max_new_tokens_input = gr.Slider(minimum=1, maximum=1024, step=1, value=512, label="Max New Tokens")
|
142 |
|
143 |
|
144 |
+
chatbot = gr.Chatbot(label="Chat with Ferret-UI", height=400, show_copy_button=True, latex_delimiters=latex_delimiters_set, type="tuples")
|
145 |
|
146 |
with gr.Blocks(title=model_name, theme=gr.themes.Ocean()) as demo:
|
147 |
gr.HTML(html)
|
appstore_reminders.png
CHANGED
Git LFS Details
|
Git LFS Details
|
eval.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
[{"id": 0, "image": "
|
|
|
1 |
+
[{"id": 0, "image": "appstore_reminders.png", "image_h": 2532, "image_w": 1170, "conversations": [{"from": "human", "value": "<image>\nWhat's inside the selected region?"}], "box_x1y1x2y2": [["189, 906, 404, 970"]]}]
|
eval_output.jsonl/0_of_1.jsonl
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"id": 0, "image_path": "
|
|
|
1 |
+
{"id": 0, "image_path": "appstore_reminders.png", "prompt": "What's inside the selected region?", "text": "Inside the selected region [[28, 284, 217, 338]] there are several icons and text. The text '210k Ratings' is visible and there are two icons, one labeled 'unknown' and the other one is unknown.", "label": null}
|