zeerd commited on
Commit
9ddf764
·
verified ·
1 Parent(s): fdfcf53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,7 +42,7 @@ def answer_question(repo_id, temperature, max_length, question):
42
  prompt = f"请根据以下知识库回答问题:\n{context}\n问题:{question}"
43
  print('prompt: ' + prompt)
44
 
45
- answer = llm(prompt)
46
  return answer
47
  except Exception as e:
48
  st.error(f"问答过程出错:{e}")
 
42
  prompt = f"请根据以下知识库回答问题:\n{context}\n问题:{question}"
43
  print('prompt: ' + prompt)
44
 
45
+ answer = llm.invoke(prompt)
46
  return answer
47
  except Exception as e:
48
  st.error(f"问答过程出错:{e}")