Commit ·
823819e
1
Parent(s): c76a4db
Update app.py
Browse files228 unmodified lines229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264228 unmodified lines# # local_dir = "./models"# # )# css = """# .message-row {# justify-content: space-evenly !important;# }# .message-bubble-border {# border-radius: 6px !important;# }# .message-buttons-bot, .message-buttons-user {# right: 10px !important;# left: auto !important;# bottom: 2px !important;# }# .dark.message-bubble-border {# border-color: #343140 !important;# }# .dark.user {# background: #1e1c26 !important;# }# .dark.assistant.dark, .dark.pending.dark {# background: #16141c !important;# }# """# def get_messages_formatter_type(model_name):# if "Llama" in model_name:# return MessagesFormatterType.LLAMA_3# elif "Mistral" in model_name:# return MessagesFormatterType.MISTRAL# else:# raise ValueError(f"Unsupported model: {model_name}")@spaces.GPU(duration=60)def respond(228 unmodified lines229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264228 unmodified lines# # local_dir = "./models"# # )css = """.message-row {justify-content: space-evenly !important;}.message-bubble-border {border-radius: 6px !important;}.message-buttons-bot, .message-buttons-user {right: 10px !important;left: auto !important;bottom: 2px !important;}.dark.message-bubble-border {border-color: #343140 !important;}.dark.user {background: #1e1c26 !important;}.dark.assistant.dark, .dark.pending.dark {background: #16141c !important;}"""def get_messages_formatter_type(model_name):if "Llama" in model_name:return MessagesFormatterType.LLAMA_3elif "Mistral" in model_name:return MessagesFormatterType.MISTRALelse:raise ValueError(f"Unsupported model: {model_name}")@spaces.GPU(duration=60)def respond(
app.py+30-30