Update app.py
Browse files
app.py
CHANGED
|
@@ -21,10 +21,10 @@ except Exception as e:
|
|
| 21 |
st.stop()
|
| 22 |
|
| 23 |
# 3. 问答函数
|
| 24 |
-
def answer_question(gemma,
|
| 25 |
# 4. 初始化 Gemma 模型
|
| 26 |
try:
|
| 27 |
-
llm = HuggingFaceEndpoint(repo_id=gemma,
|
| 28 |
except Exception as e:
|
| 29 |
st.error(f"Gemma 模型加载失败:{e}")
|
| 30 |
st.stop()
|
|
|
|
| 21 |
st.stop()
|
| 22 |
|
| 23 |
# 3. 问答函数
|
| 24 |
+
def answer_question(gemma, temp, max, question):
|
| 25 |
# 4. 初始化 Gemma 模型
|
| 26 |
try:
|
| 27 |
+
llm = HuggingFaceEndpoint(repo_id=gemma, temperature=temp, max_length=max)
|
| 28 |
except Exception as e:
|
| 29 |
st.error(f"Gemma 模型加载失败:{e}")
|
| 30 |
st.stop()
|