Spaces:
Runtime error
Runtime error
Commit History
-
Update app.py
Verified signature# @title import re import gradio as gr import tempfile import os def extract_summary(text_input, file_obj): """ Extracts the summary content starting from 'Summary ID:' from the given input. Prioritizes file_obj if uploaded, otherwise uses text_input. It stops before the line containing '॥ गीता पढ़ें, पढ़ायें, जीवन में लायें ॥'. If successful, it also saves the content to a temporary file for download. Returns a tuple of (extracted_text, file_path_for_download). """ content_to_process = "" if file_obj is not None: try: with open(file_obj.name, 'r', encoding='utf-8') as f: content_to_process = f.read() except Exception as e: return f"Error reading uploaded file: {e}", None elif text_input: content_to_process = text_input else: return "Please paste text into the textbox or upload a Markdown file.", None if not content_to_process.strip(): return "No content p…bdfc03e -
Update app.py
Verified signaturec64dacc -
Update app.py
Verified signature7078263 -
Update app.py
Verified signatureff67ae0 -
Update app.py
Verified signaturefdc34a6 -
Update app.py
Verified signature982c973
-
Create requirements.txt
Verified signature6948ba1 -
Create app.py
Verified signature30091bd -
initial commit
Verified signature20818fb