seawolf2357
commited on
Commit
β’
9a766b3
1
Parent(s):
672b059
Update app.py
Browse files
app.py
CHANGED
@@ -87,8 +87,11 @@ async def extract_keywords(message):
|
|
87 |
response = await loop.run_in_executor(None, lambda: hf_client.chat_completion(
|
88 |
messages, max_tokens=10, temperature=0.7, top_p=0.85))
|
89 |
|
90 |
-
#
|
91 |
-
|
|
|
|
|
|
|
92 |
logging.debug(f'Extracted keywords: {keywords}')
|
93 |
return keywords
|
94 |
|
|
|
87 |
response = await loop.run_in_executor(None, lambda: hf_client.chat_completion(
|
88 |
messages, max_tokens=10, temperature=0.7, top_p=0.85))
|
89 |
|
90 |
+
# Hugging Face μλ΅ νμ±
|
91 |
+
if response.choices and response.choices[0].message:
|
92 |
+
keywords = response.choices[0].message['content'].strip()
|
93 |
+
else:
|
94 |
+
keywords = ""
|
95 |
logging.debug(f'Extracted keywords: {keywords}')
|
96 |
return keywords
|
97 |
|