srijaydeshpande commited on
Commit
009b11d
1 Parent(s): 19e7e1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -30
app.py CHANGED
@@ -229,36 +229,36 @@ hf_hub_download(
229
  # # local_dir = "./models"
230
  # # )
231
 
232
- # css = """
233
- # .message-row {
234
- # justify-content: space-evenly !important;
235
- # }
236
- # .message-bubble-border {
237
- # border-radius: 6px !important;
238
- # }
239
- # .message-buttons-bot, .message-buttons-user {
240
- # right: 10px !important;
241
- # left: auto !important;
242
- # bottom: 2px !important;
243
- # }
244
- # .dark.message-bubble-border {
245
- # border-color: #343140 !important;
246
- # }
247
- # .dark.user {
248
- # background: #1e1c26 !important;
249
- # }
250
- # .dark.assistant.dark, .dark.pending.dark {
251
- # background: #16141c !important;
252
- # }
253
- # """
254
-
255
- # def get_messages_formatter_type(model_name):
256
- # if "Llama" in model_name:
257
- # return MessagesFormatterType.LLAMA_3
258
- # elif "Mistral" in model_name:
259
- # return MessagesFormatterType.MISTRAL
260
- # else:
261
- # raise ValueError(f"Unsupported model: {model_name}")
262
 
263
  @spaces.GPU(duration=60)
264
  def respond(
 
229
  # # local_dir = "./models"
230
  # # )
231
 
232
+ css = """
233
+ .message-row {
234
+ justify-content: space-evenly !important;
235
+ }
236
+ .message-bubble-border {
237
+ border-radius: 6px !important;
238
+ }
239
+ .message-buttons-bot, .message-buttons-user {
240
+ right: 10px !important;
241
+ left: auto !important;
242
+ bottom: 2px !important;
243
+ }
244
+ .dark.message-bubble-border {
245
+ border-color: #343140 !important;
246
+ }
247
+ .dark.user {
248
+ background: #1e1c26 !important;
249
+ }
250
+ .dark.assistant.dark, .dark.pending.dark {
251
+ background: #16141c !important;
252
+ }
253
+ """
254
+
255
+ def get_messages_formatter_type(model_name):
256
+ if "Llama" in model_name:
257
+ return MessagesFormatterType.LLAMA_3
258
+ elif "Mistral" in model_name:
259
+ return MessagesFormatterType.MISTRAL
260
+ else:
261
+ raise ValueError(f"Unsupported model: {model_name}")
262
 
263
  @spaces.GPU(duration=60)
264
  def respond(