Pittawat Taveekitworachai commited on
Commit
2801168
·
1 Parent(s): 7a071a4

doc: add doc stuffs

Browse files
Files changed (1) hide show
  1. demo.py +24 -3
demo.py CHANGED
@@ -73,7 +73,6 @@ def bot_streaming(message, history, max_new_tokens=512):
73
  )
74
 
75
  if len(message["files"]) == 1:
76
-
77
  if isinstance(message["files"][0], str):
78
  image = Image.open(message["files"][0]).convert("RGB")
79
  else:
@@ -119,11 +118,32 @@ def bot_streaming(message, history, max_new_tokens=512):
119
 
120
  demo = gr.ChatInterface(
121
  fn=bot_streaming,
122
- title="Typhoon 2 Vision",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  textbox=gr.MultimodalTextbox(
124
  placeholder="Type a message or drag and drop an image",
125
  file_types=["image"],
126
- file_count="multiple"
127
  ),
128
  additional_inputs=[
129
  gr.Slider(
@@ -141,4 +161,5 @@ demo = gr.ChatInterface(
141
  theme=theme,
142
  )
143
 
 
144
  demo.launch(ssr_mode=False)
 
73
  )
74
 
75
  if len(message["files"]) == 1:
 
76
  if isinstance(message["files"][0], str):
77
  image = Image.open(message["files"][0]).convert("RGB")
78
  else:
 
118
 
119
  demo = gr.ChatInterface(
120
  fn=bot_streaming,
121
+ title="🌪️ Typhoon2-Vision: Vision-Language Model optimized for Thai",
122
+ description="""
123
+ <ul>
124
+ <li>📝 <b>Technical Report</b>: <a href="https://arxiv.org/abs/2412.13702" target="_blank">https://arxiv.org/abs/2412.13702 (Section 5)</a></li>
125
+ <li>🤗 <b>Model weights</b>: <a href="https://huggingface.co/scb10x/typhoon2-qwen2vl-7b-vision-instruct" target="_blank">https://huggingface.co/scb10x/typhoon2-qwen2vl-7b-vision-instruct</a></li>
126
+ </ul>
127
+ <br />
128
+ <details>
129
+ <summary><strong>Disclaimer</strong></summary>
130
+ The responses generated by this Artificial Intelligence (AI) system are autonomously constructed and do not necessarily reflect the views or positions of the developing organizations, their affiliates, or any of their employees. These AI-generated responses do not represent those of the organizations. The organizations do not endorse, support, sanction, encourage, verify, or agree with the comments, opinions, or statements generated by this AI. The information produced by this AI is not intended to malign any religion, ethnic group, club, organization, company, individual, anyone, or anything. It is not the intent of the organizations to malign any group or individual. The AI operates based on its programming and training data and its responses should not be interpreted as the explicit intent or opinion of the organizations.
131
+ </details>
132
+ <br />
133
+ <details>
134
+ <summary><strong>Terms of use</strong></summary>
135
+ By using this service, users are required to agree to the following terms: The service is a research preview intended for non-commercial use only. It only provides limited safety measures and may generate offensive content. It must not be used for any illegal, harmful, violent, racist, or sexual purposes. Vision language models are prone to hallucinations to a greater extent compared to text-only LLMs.
136
+ </details>
137
+ <br />
138
+ <details>
139
+ <summary><strong>License</strong></summary>
140
+ This project utilizes certain datasets and checkpoints that are subject to their respective original licenses. Users must comply with all terms and conditions of these original licenses. The content of this project itself is licensed under the Apache license 2.0.
141
+ </details>
142
+ """,
143
  textbox=gr.MultimodalTextbox(
144
  placeholder="Type a message or drag and drop an image",
145
  file_types=["image"],
146
+ file_count="multiple",
147
  ),
148
  additional_inputs=[
149
  gr.Slider(
 
161
  theme=theme,
162
  )
163
 
164
+ demo.queue()
165
  demo.launch(ssr_mode=False)