ffreemt
commited on
Commit
·
df5ea2a
1
Parent(s):
25c94fc
Update
Browse files- app.py +3 -2
- requirements.txt +2 -2
app.py
CHANGED
@@ -140,8 +140,9 @@ def reinit_model(llm_model, embedding_model, history):
|
|
140 |
)
|
141 |
model_status = """模型已成功重新加载,请选择文件后点击"加载文件"按钮"""
|
142 |
except Exception as e:
|
143 |
-
|
144 |
-
|
|
|
145 |
model = None
|
146 |
return history + [[None, model_status]]
|
147 |
|
|
|
140 |
)
|
141 |
model_status = """模型已成功重新加载,请选择文件后点击"加载文件"按钮"""
|
142 |
except Exception as e:
|
143 |
+
_ = f"llm_model: {llm_model}, embedding_model: {embedding_model} "
|
144 |
+
logger.error(f"{_}, {e}")
|
145 |
+
model_status = f"""{_} - {e}: 模型未成功重新加载,请重新选择后点击"加载模型"按钮"""
|
146 |
model = None
|
147 |
return history + [[None, model_status]]
|
148 |
|
requirements.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
2 |
# uncomment the next line for cpu
|
3 |
-
--extra-index-url https://download.pytorch.org/whl/cpu
|
4 |
-
torch
|
5 |
|
6 |
# may need to set gradio==3.28.3
|
7 |
gradio
|
|
|
1 |
# pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
2 |
# uncomment the next line for cpu
|
3 |
+
# --extra-index-url https://download.pytorch.org/whl/cpu
|
4 |
+
# torch
|
5 |
|
6 |
# may need to set gradio==3.28.3
|
7 |
gradio
|