Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"
|
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
|