Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -2,15 +2,15 @@ import torch
|
|
2 |
import gradio as gr
|
3 |
from threading import Thread
|
4 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
5 |
-
device = "cuda" # the device to load the model onto
|
6 |
-
|
7 |
|
8 |
|
9 |
bot_avatar = "shuaikang/dl_logo_rect.png" # 聊天机器人头像位置
|
10 |
user_avatar = "shuaikang/user_avatar.jpg" # 用户头像位置
|
11 |
#model_path = "sethuiyer/Medichat-Llama3-8B" # 已下载的模型位置
|
12 |
-
|
13 |
-
model_path = "aaditya/Llama3-OpenBioLLM-8B"
|
14 |
|
15 |
# 存储全局的历史对话记录,Llama3支持系统prompt,所以这里默认设置!
|
16 |
llama3_chat_history = [
|
|
|
2 |
import gradio as gr
|
3 |
from threading import Thread
|
4 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
5 |
+
#device = "cuda" # the device to load the model onto
|
6 |
+
device = "cpu" # the device to load the model onto
|
7 |
|
8 |
|
9 |
bot_avatar = "shuaikang/dl_logo_rect.png" # 聊天机器人头像位置
|
10 |
user_avatar = "shuaikang/user_avatar.jpg" # 用户头像位置
|
11 |
#model_path = "sethuiyer/Medichat-Llama3-8B" # 已下载的模型位置
|
12 |
+
model_path = "johnsnowlabs/JSL-MedMX-7X"
|
13 |
+
#model_path = "aaditya/Llama3-OpenBioLLM-8B"
|
14 |
|
15 |
# 存储全局的历史对话记录,Llama3支持系统prompt,所以这里默认设置!
|
16 |
llama3_chat_history = [
|