Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
|
@@ -113,12 +113,12 @@ def generate_ai_summary():
|
|
| 113 |
key_sentences = [s.strip() for s in sentences if len(s.strip()) > 10][:5]
|
| 114 |
summary = '。'.join(key_sentences) + '。'
|
| 115 |
else:
|
| 116 |
-
input_text = parsed_text[:
|
| 117 |
prompt = f"Please summarize:\n\n{input_text}\n\nSummary:"
|
| 118 |
|
| 119 |
result = generator(
|
| 120 |
prompt,
|
| 121 |
-
max_new_tokens=
|
| 122 |
num_return_sequences=1,
|
| 123 |
temperature=0.7,
|
| 124 |
do_sample=True,
|
|
|
|
| 113 |
key_sentences = [s.strip() for s in sentences if len(s.strip()) > 10][:5]
|
| 114 |
summary = '。'.join(key_sentences) + '。'
|
| 115 |
else:
|
| 116 |
+
input_text = parsed_text[:2000]
|
| 117 |
prompt = f"Please summarize:\n\n{input_text}\n\nSummary:"
|
| 118 |
|
| 119 |
result = generator(
|
| 120 |
prompt,
|
| 121 |
+
max_new_tokens=300,
|
| 122 |
num_return_sequences=1,
|
| 123 |
temperature=0.7,
|
| 124 |
do_sample=True,
|