Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ def generate_text(start_text):
|
|
| 61 |
output_text = start_text + " "
|
| 62 |
end_tokens = [".", "?", "!"] # tokens that indicate the end of a sentence
|
| 63 |
num_words = len(start_text.split())
|
| 64 |
-
for i in range(
|
| 65 |
# Predict the next word using the model
|
| 66 |
output_seq = model.predict(input_seq)
|
| 67 |
output_word = index_to_word[np.argmax(output_seq)]
|
|
|
|
| 61 |
output_text = start_text + " "
|
| 62 |
end_tokens = [".", "?", "!"] # tokens that indicate the end of a sentence
|
| 63 |
num_words = len(start_text.split())
|
| 64 |
+
for i in range(1):
|
| 65 |
# Predict the next word using the model
|
| 66 |
output_seq = model.predict(input_seq)
|
| 67 |
output_word = index_to_word[np.argmax(output_seq)]
|