akhaliq HF Staff commited on
Commit
0eba8b1
·
verified ·
1 Parent(s): 229ba3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -43
app.py CHANGED
@@ -142,46 +142,7 @@ def process_video_and_question(video, question, fps, force_packing, history):
142
  def clear_chat():
143
  return [], None, "", 3, 0
144
 
145
- # CSS for better styling with Apple-inspired design
146
- css = """
147
- .chat-container {
148
- overflow-y: auto;
149
- border-radius: 12px;
150
- }
151
-
152
- .gradio-container {
153
- font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif !important;
154
- }
155
-
156
- .gr-button {
157
- font-weight: 500;
158
- transition: all 0.2s ease;
159
- }
160
-
161
- .gr-button:active {
162
- transform: scale(0.98);
163
- }
164
-
165
- .gr-input, .gr-textarea {
166
- backdrop-filter: blur(10px);
167
- }
168
-
169
- .gr-box {
170
- backdrop-filter: blur(20px);
171
- background: rgba(255, 255, 255, 0.8) !important;
172
- }
173
-
174
- .dark .gr-box {
175
- background: rgba(0, 0, 0, 0.6) !important;
176
- }
177
-
178
- /* Smooth transitions */
179
- * {
180
- transition: background-color 0.2s ease, border-color 0.2s ease;
181
- }
182
- """
183
-
184
- # Create Gradio interface with Apple-style theme
185
  theme = gr.themes.Soft(
186
  primary_hue=gr.themes.colors.blue,
187
  secondary_hue=gr.themes.colors.gray,
@@ -215,7 +176,7 @@ theme = gr.themes.Soft(
215
  slider_color="*primary_500",
216
  )
217
 
218
- with gr.Blocks(css=css, theme=theme, title="Video Chat with MiniCPM-V") as demo:
219
  gr.Markdown(
220
  """
221
  # 🎥 Video Chat with MiniCPM-V-4.5
@@ -240,8 +201,7 @@ with gr.Blocks(css=css, theme=theme, title="Video Chat with MiniCPM-V") as demo:
240
  chatbot = gr.Chatbot(
241
  label="Chat",
242
  height=300,
243
- type="messages",
244
- elem_classes="chat-container"
245
  )
246
 
247
  with gr.Row():
 
142
  def clear_chat():
143
  return [], None, "", 3, 0
144
 
145
+ # Create Gradio interface with theme
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  theme = gr.themes.Soft(
147
  primary_hue=gr.themes.colors.blue,
148
  secondary_hue=gr.themes.colors.gray,
 
176
  slider_color="*primary_500",
177
  )
178
 
179
+ with gr.Blocks(theme=theme, title="Video Chat with MiniCPM-V") as demo:
180
  gr.Markdown(
181
  """
182
  # 🎥 Video Chat with MiniCPM-V-4.5
 
201
  chatbot = gr.Chatbot(
202
  label="Chat",
203
  height=300,
204
+ type="messages"
 
205
  )
206
 
207
  with gr.Row():