Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def summarize(text):
|
|
18 |
|
19 |
#generated_summary_short = summarizer(text, max_length=40, min_length=10)[0]['summary_text']
|
20 |
#generated_summary = summarizer(text, max_length=80, min_length=20)[0]['summary_text']
|
21 |
-
|
22 |
|
23 |
fields = [str(text), str(generated_summary)]
|
24 |
with open('input.csv','a', newline='') as f:
|
@@ -26,7 +26,7 @@ def summarize(text):
|
|
26 |
writer.writerow(fields)
|
27 |
|
28 |
#return "Summary: " + str(generated_summary) + "\n\n" + "shorter: " + str(generated_summary_short)+ "\n\n" + "Longer: " + str(generated_summary_long)
|
29 |
-
return "Summary: " + str(
|
30 |
|
31 |
|
32 |
iface = gr.Interface(fn=summarize, inputs="text", outputs="text")
|
|
|
18 |
|
19 |
#generated_summary_short = summarizer(text, max_length=40, min_length=10)[0]['summary_text']
|
20 |
#generated_summary = summarizer(text, max_length=80, min_length=20)[0]['summary_text']
|
21 |
+
generated_summary = summarizer(text, max_length=200, min_length=40)[0]['summary_text']
|
22 |
|
23 |
fields = [str(text), str(generated_summary)]
|
24 |
with open('input.csv','a', newline='') as f:
|
|
|
26 |
writer.writerow(fields)
|
27 |
|
28 |
#return "Summary: " + str(generated_summary) + "\n\n" + "shorter: " + str(generated_summary_short)+ "\n\n" + "Longer: " + str(generated_summary_long)
|
29 |
+
return "Summary: " + str(generated_summary)
|
30 |
|
31 |
|
32 |
iface = gr.Interface(fn=summarize, inputs="text", outputs="text")
|