ccm commited on
Commit
c450b02
·
verified ·
1 Parent(s): 6635dba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -77,11 +77,11 @@ def reply(message: str, history: list[str]) -> str:
77
  # Preprocess message
78
 
79
  pipe = transformers.pipeline(
80
- "text2text-generation", model="Qwen/Qwen2.5-7B-Instruct", device="cuda", return_full_text=False
81
  )
82
 
83
  message = preprocess(message, PUBLICATIONS_TO_RETRIEVE)
84
- return pipe(message, max_new_tokens=512)[0]["generated_text"]
85
 
86
 
87
  # Example Queries for Interface
 
77
  # Preprocess message
78
 
79
  pipe = transformers.pipeline(
80
+ "text2text-generation", model="Qwen/Qwen2.5-7B-Instruct", device="cuda"
81
  )
82
 
83
  message = preprocess(message, PUBLICATIONS_TO_RETRIEVE)
84
+ return pipe(message, max_new_tokens=512, return_full_text=False)[0]["generated_text"]
85
 
86
 
87
  # Example Queries for Interface