Commit ·
823819e
1
Parent(s): c76a4db
Update app.py
Browse files
app.py
CHANGED
|
@@ -229,36 +229,36 @@ hf_hub_download(
|
|
| 229 |
# # local_dir = "./models"
|
| 230 |
# # )
|
| 231 |
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 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(
|