Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def generate_response(message):
|
|
17 |
global history
|
18 |
for _ in range(2): # Assuming you want two responses, adjust as needed
|
19 |
tokens = [ord(char) for char in message] # Convert characters to ASCII values
|
20 |
-
response = llm.generate(tokens=tokens, top_k=50, top_p=0.95, temperature=1.0, repetition_penalty=1.0, last_n_tokens=1)
|
21 |
response_text = ' '.join(map(str, response))
|
22 |
time.sleep(2)
|
23 |
corrected_response = correct_words(response_text)
|
|
|
17 |
global history
|
18 |
for _ in range(2): # Assuming you want two responses, adjust as needed
|
19 |
tokens = [ord(char) for char in message] # Convert characters to ASCII values
|
20 |
+
response = llm.generate(tokens=tokens, top_k=50, top_p=0.95, temperature=1.0, repetition_penalty=1.0, last_n_tokens=1,stream=True)
|
21 |
response_text = ' '.join(map(str, response))
|
22 |
time.sleep(2)
|
23 |
corrected_response = correct_words(response_text)
|