jadechoghari commited on
Commit
445bd13
β€’
1 Parent(s): 07c090a

add changes

Browse files
__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
- 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
- with open(f"{cur_dir}/ferretui_icon.png", "rb") as image_file:
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

  • SHA256: e72af960c6ddd788e45ee29a00ad43c5f8fc80a688938e34fced4c41fc50e22b
  • Pointer size: 131 Bytes
  • Size of remote file: 911 kB

Git LFS Details

  • SHA256: 7c1bfbaf5e10fdcaf83f10986c1529d5306c94290d1b2bc298296f0b1917066b
  • Pointer size: 131 Bytes
  • Size of remote file: 654 kB
eval.json CHANGED
@@ -1 +1 @@
1
- [{"id": 0, "image": "Screenshot 2024-10-13 at 12.01.05\u202fAM.png", "image_h": 76, "image_w": 90, "conversations": [{"from": "human", "value": "<image>\ndescribe what you see in details"}]}]
 
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": "Screenshot 2024-10-13 at 12.01.05\u202fAM.png", "prompt": "describe what you see in details", "text": "The screen contains a large picture that occupies most of the screen, extending from nearly the top to the bottom. In the lower portion of the screen, there is a button labeled \"menu\". The button is relatively large and positioned at the lower part of the screen.", "label": null}
 
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}