vilarin commited on
Commit
5add2b0
β€’
1 Parent(s): 17410b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -16,21 +16,22 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
16
  MODEL_ID = os.environ.get("MODEL_ID")
17
  MODEL_NAME = MODEL_ID.split("/")[-1]
18
 
19
- TITLE = "<h1>VL-Chatbox</h1>"
20
 
21
  DESCRIPTION = f"""
22
  <center>
23
- <p>😊 A Space For My Fav Multimodal.
 
24
  <br>
25
- πŸš€ MODEL NOW: <a href="https://hf.co/{MODEL_ID}">{MODEL_NAME}</a>
26
  <br>
27
- ✨ Tips: Now you can send DM or upload 1 IMAGE/FILE per time.
28
  <br>
29
  ✨ Tips: Please increase MAX LENGTH when deal with file.
30
  <br>
31
  πŸ€™ Supported Format: pdf, txt, docx, pptx, md, png, jpg, webp
32
  <br>
33
- πŸ™‡β€β™‚οΈ May be rebuilding from time to time.</p>
 
34
  </center>"""
35
 
36
  CSS = """
@@ -160,7 +161,7 @@ def stream_chat(message, history: list, temperature: float, max_length: int, top
160
 
161
 
162
 
163
- chatbot = gr.Chatbot()
164
  chat_input = gr.MultimodalTextbox(
165
  interactive=True,
166
  placeholder="Enter message or upload a file one time...",
@@ -168,14 +169,13 @@ chat_input = gr.MultimodalTextbox(
168
 
169
  )
170
  EXAMPLES = [
171
- [{"text": "Describe it in detailed", "files": ["./laptop.jpg"]}],
172
- [{"text": "Where it is?", "files": ["./hotel.jpg"]}],
173
- [{"text": "Is it real?", "files": ["./spacecat.png"]}]
174
  ]
175
 
176
  with gr.Blocks(css=CSS, theme="soft",fill_height=True) as demo:
177
  gr.HTML(TITLE)
178
- gr.HTML(DESCRIPTION)
179
  gr.ChatInterface(
180
  fn=stream_chat,
181
  multimodal=True,
 
16
  MODEL_ID = os.environ.get("MODEL_ID")
17
  MODEL_NAME = MODEL_ID.split("/")[-1]
18
 
19
+ TITLE = "<h1>VL-Chatbox</h1><br><center>πŸš€ MODEL NOW: <a href="https://hf.co/{MODEL_ID}">{MODEL_NAME}</a></center>"
20
 
21
  DESCRIPTION = f"""
22
  <center>
23
+ <p>
24
+ A Space for Vision/Multimodal
25
  <br>
 
26
  <br>
27
+ ✨ Tips: Send Messages or upload 1 IMAGE/FILE per time.
28
  <br>
29
  ✨ Tips: Please increase MAX LENGTH when deal with file.
30
  <br>
31
  πŸ€™ Supported Format: pdf, txt, docx, pptx, md, png, jpg, webp
32
  <br>
33
+ πŸ™‡β€β™‚οΈ May be rebuilding from time to time.
34
+ </p>
35
  </center>"""
36
 
37
  CSS = """
 
161
 
162
 
163
 
164
+ chatbot = gr.Chatbot(label="Chatbox", height=600, placeholder=DESCRIPTION)
165
  chat_input = gr.MultimodalTextbox(
166
  interactive=True,
167
  placeholder="Enter message or upload a file one time...",
 
169
 
170
  )
171
  EXAMPLES = [
172
+ [{"text": "Describe this image in great detailed.", "files": ["./laptop.jpg"]}],
173
+ [{"text": "Please describe this image and guess where it is?", "files": ["./hotel.jpg"]}],
174
+ [{"text": "What's in the image, is it real happen?", "files": ["./spacecat.png"]}]
175
  ]
176
 
177
  with gr.Blocks(css=CSS, theme="soft",fill_height=True) as demo:
178
  gr.HTML(TITLE)
 
179
  gr.ChatInterface(
180
  fn=stream_chat,
181
  multimodal=True,