Satyam-Singh commited on
Commit
a8214c1
·
verified ·
1 Parent(s): 99b0c5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -31
app.py CHANGED
@@ -9,10 +9,10 @@ TITLE = """<h1 align="center">LLaVa Large Language Virtual Assistant</h1>"""
9
 
10
  # Set up the model
11
  generation_config = {
12
- "temperature": 0.9,
13
- "top_p": 1,
14
- "top_k": 1,
15
- "max_output_tokens": 4096,
16
  }
17
 
18
  safety_settings = [
@@ -179,30 +179,19 @@ examples=[["I'm planning a vacation to India. Can you suggest a one-week itinera
179
  ["What are some unique features of Python that make it stand out compared to other systems programming languages like C++,Java?", None, None, None, None, None,],
180
  ]
181
 
182
- css = """
183
- #mkd {
184
- height: 500px;
185
- overflow: auto;
186
- border: 1px solid #ccc;
187
- }
188
- """
189
-
190
- with gr.Blocks(css=css) as chat:
191
- gr.HTML(TITLE)
192
- gr.ChatInterface(
193
- fn=gemini_chat,
194
- chatbot=gr.Chatbot(show_label=False,
195
- avatar_images=(None, 'llava-logo.svg'),
196
- show_share_button=False,
197
- show_copy_button=True,
198
- likeable=True,
199
- layout="panel",
200
- bubble_full_width=True
201
- ),
202
- title="LLAVA: Large Language Virtual Assistant",
203
- description="Official Demo Of ```LLAVA``` based on ```Large Language Virtual Assistant ```.",
204
- additional_inputs=additional_inputs,
205
- examples=examples,
206
- concurrency_limit=20,
207
- )
208
- chat.launch(show_api=True)
 
9
 
10
  # Set up the model
11
  generation_config = {
12
+ "temperature": temperature_component,#0.9,
13
+ "top_p": top_p_component,#1,
14
+ "top_k": top_k_component,#1,
15
+ "max_output_tokens": max_output_tokens_component,#4096,
16
  }
17
 
18
  safety_settings = [
 
179
  ["What are some unique features of Python that make it stand out compared to other systems programming languages like C++,Java?", None, None, None, None, None,],
180
  ]
181
 
182
+ gr.ChatInterface(
183
+ fn=gemini_chat,
184
+ chatbot=gr.Chatbot(show_label=False,
185
+ avatar_images=(None, 'llava-logo.svg'),
186
+ show_share_button=False,
187
+ show_copy_button=True,
188
+ likeable=True,
189
+ layout="panel",
190
+ bubble_full_width=True
191
+ ),
192
+ title="LLAVA: Large Language Virtual Assistant",
193
+ description="Official Demo Of ```LLAVA``` based on ```Large Language Virtual Assistant ```.",
194
+ additional_inputs=additional_inputs,
195
+ examples=examples,
196
+ concurrency_limit=20,
197
+ ).launch(show_api=True)