Spaces:
Sleeping
Sleeping
Commit History
-
Update app.py
Verified signature258987a -
Update app.py
Verified signature6587e7e -
Update app.py
Verified signatureb77b8c7 -
Update app.py
Verified signature2ab6e28 -
Update requirements.txt
Verified signature6762af4 -
Update app.py
Verified signaturef976b0a -
Update requirements.txt
Verified signaturedowngraded gradio due to No API bug42a10cf -
Update app.py
Verified signaturef5223a2 -
Update app.py
Verified signature172e20b -
Update app.py
Verified signature57d5ea4 -
Update app.py
Verified signature# text feld +ber transform button, ? # txt dateien selbes problem, wie bei pdf - name vom file und prompt, statt inhalt ? # neues gradio theme ! # pypi für exakte versionsnummererung "version pinning" in requirements.txt ! # changed keywords from 3 to 58f28339 -
Update requirements.txt
Verified signaturef4b1fad -
Update app.py
Verified signaturee2e5815
-
Update app.py
Verified signatureno more prompt in the summaryd3959f2 -
Update app.py
Verified signatureFixed Bug, where prompt and file name of pdf was analysed. Added info for max tokens2224978 -
Update app.py
Verified signatureChanged "pyTorchTensor" to ptcf271ff -
Update app.py
Verified signatureBug 1) prompt_map.get(lang_code, prompt_map["en"]) returns the dictionary for the language, while [style] accesses the specific prompt string for the chosen style. Solution: Removed the unnecessary +[style] part since the style is already used to select the prompt Bug 2) cleaned up UI3d68164 -
Update app.py
Verified signature8ef2c76 -
Update app.py
Verified signature31-40 ### Handle File Uploads Correctly in Gradio Spaces This section ensures robust handling of file uploads in Hugging Face Spaces using Gradio: - **PDF files**: When a user uploads a PDF, the file object is a `NamedBytesIO` and supports `.read()`. We use `fitz` (PyMuPDF) to extract text from each page. - **TXT files**: When a user uploads a TXT file, the file object is a `NamedString` (acts like a string, does **not** support `.read()`). We simply convert it to a string. - **Other file types**: These are ignored and result in an empty input. This distinction is important because Hugging Face Spaces passes different file-like objects depending on the file type. Attempting to call `.read()` on a `NamedString` (TXT) will raise an `AttributeError`. **Summary:** - Use `.read()` only for PDFs. - Use `str(file)` for TXT files. - This approach prevents runtime errors and ensures the summarizer works for both file types.9192e24 -
Update app.py
Verified signature6cb6a24 -
Create requirements.txt
Verified signature624df34 -
Update app.py
Verified signature438279d -
Create app.py
Verified signature3a361ef -
initial commit
Verified signature7e44b3c