Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def chat_with_bot(bot_personality, user_input):
|
|
29 |
"""
|
30 |
prompt = f"Sən {bot_personality} bir botsan. İstifadəçinin sualına düzgün və ətraflı cavab ver.\nİstifadəçi: {user_input}\nBot:"
|
31 |
try:
|
32 |
-
response = pipe(prompt, max_length=200, num_return_sequences=1)
|
33 |
match = re.search(r"Bot:\s*(.*?)(?=(İstifadəçi:|[\r\n]*$))", response[0]['generated_text'], re.DOTALL)
|
34 |
if match:
|
35 |
bot_message = match.group(1).strip()
|
|
|
29 |
"""
|
30 |
prompt = f"Sən {bot_personality} bir botsan. İstifadəçinin sualına düzgün və ətraflı cavab ver.\nİstifadəçi: {user_input}\nBot:"
|
31 |
try:
|
32 |
+
response = pipe(prompt, max_length=200, num_return_sequences=1, num_beams=3, temperature=0.7)
|
33 |
match = re.search(r"Bot:\s*(.*?)(?=(İstifadəçi:|[\r\n]*$))", response[0]['generated_text'], re.DOTALL)
|
34 |
if match:
|
35 |
bot_message = match.group(1).strip()
|