HuanjinYao commited on
Commit
291ddd0
1 Parent(s): bf5acef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -18,12 +18,7 @@ from PIL import Image
18
  from dc.mm_utils import tokenizer_image_token, process_images, get_model_name_from_path
19
 
20
 
21
- PLACEHOLDER = """
22
- <div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
23
- <img src="https://cdn-thumbnails.huggingface.co/social-thumbnails/models/mistralai/Mistral-7B-Instruct-v0.3.png" style="width: 70%; max-width: 550px; height: auto; opacity: 0.55; ">
24
- <p style="font-size: 20px; margin-bottom: 2px; opacity: 0.65;">Ask me anything...</p>
25
- </div>
26
- """
27
 
28
  tokenizer = AutoTokenizer.from_pretrained('HuanjinYao/DenseConnector-v1.5-8B', use_fast=False)
29
  model = LlavaLlamaForCausalLM.from_pretrained('HuanjinYao/DenseConnector-v1.5-8B', low_cpu_mem_usage=True,torch_dtype=torch.float16)
@@ -129,7 +124,7 @@ def bot_streaming(message, history):
129
  yield generated_text_without_prompt
130
 
131
 
132
- chatbot=gr.Chatbot(placeholder=PLACEHOLDER,scale=1)
133
  chat_input = gr.MultimodalTextbox(interactive=True, file_types=["image"], placeholder="Enter message or upload file...", show_label=False)
134
  with gr.Blocks(fill_height=True, ) as demo:
135
  gr.ChatInterface(
 
18
  from dc.mm_utils import tokenizer_image_token, process_images, get_model_name_from_path
19
 
20
 
21
+
 
 
 
 
 
22
 
23
  tokenizer = AutoTokenizer.from_pretrained('HuanjinYao/DenseConnector-v1.5-8B', use_fast=False)
24
  model = LlavaLlamaForCausalLM.from_pretrained('HuanjinYao/DenseConnector-v1.5-8B', low_cpu_mem_usage=True,torch_dtype=torch.float16)
 
124
  yield generated_text_without_prompt
125
 
126
 
127
+ chatbot=gr.Chatbot(label=f"Chat with Dense Connector")
128
  chat_input = gr.MultimodalTextbox(interactive=True, file_types=["image"], placeholder="Enter message or upload file...", show_label=False)
129
  with gr.Blocks(fill_height=True, ) as demo:
130
  gr.ChatInterface(