BingeAIGC commited on
Commit
de1fb11
·
verified ·
1 Parent(s): f2e4a77

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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[:500]
117
  prompt = f"Please summarize:\n\n{input_text}\n\nSummary:"
118
 
119
  result = generator(
120
  prompt,
121
- max_new_tokens=100,
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,