Spaces:
Runtime error
Runtime error
SumayyaAli
commited on
Commit
•
0c332ef
1
Parent(s):
935b5e7
Update app.py
Browse files
app.py
CHANGED
@@ -67,10 +67,12 @@ def main():
|
|
67 |
temp_file.flush() # Ensure contents are written to disk
|
68 |
filepath = temp_file.name
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
# Clean up the temporary file
|
75 |
os.remove(filepath)
|
76 |
|
|
|
67 |
temp_file.flush() # Ensure contents are written to disk
|
68 |
filepath = temp_file.name
|
69 |
|
70 |
+
|
71 |
+
try:
|
72 |
+
summary = llm_pipeline(filepath)
|
73 |
+
st.success(summary) # Display only the summary
|
74 |
+
except Exception as e:
|
75 |
+
st.error(f"An error occurred during summarization: {e}")
|
76 |
# Clean up the temporary file
|
77 |
os.remove(filepath)
|
78 |
|