Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,9 @@ def summarize_document(file):
|
|
67 |
|
68 |
try:
|
69 |
summary = pipe(text, max_length=max_summary_len, min_length=int(max_summary_len * 0.6), do_sample=False)
|
70 |
-
|
|
|
|
|
71 |
except Exception as e:
|
72 |
return f"Error during summarization: {e}"
|
73 |
|
|
|
67 |
|
68 |
try:
|
69 |
summary = pipe(text, max_length=max_summary_len, min_length=int(max_summary_len * 0.6), do_sample=False)
|
70 |
+
# Print the summary to debug its structure
|
71 |
+
print(summary)
|
72 |
+
return summary[0]['summary_text'] # Access the correct key for the output
|
73 |
except Exception as e:
|
74 |
return f"Error during summarization: {e}"
|
75 |
|