Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ def summary(input):
|
|
| 10 |
# Create a prompt in Hebrew for summarization
|
| 11 |
prompt = f"סכם את הטקסט הבא: {input}"
|
| 12 |
# Increase max_length and set max_new_tokens to avoid input length issues
|
| 13 |
-
output = text_summary(prompt,
|
| 14 |
return output[0]['generated_text']
|
| 15 |
|
| 16 |
gr.close_all()
|
|
|
|
| 10 |
# Create a prompt in Hebrew for summarization
|
| 11 |
prompt = f"סכם את הטקסט הבא: {input}"
|
| 12 |
# Increase max_length and set max_new_tokens to avoid input length issues
|
| 13 |
+
output = text_summary(prompt, max_new_tokens=512, min_length=30, do_sample=False)
|
| 14 |
return output[0]['generated_text']
|
| 15 |
|
| 16 |
gr.close_all()
|