Spaces:
Build error
Build error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +6 -4
src/streamlit_app.py
CHANGED
|
@@ -1,16 +1,18 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from PIL import Image, UnidentifiedImageError
|
| 3 |
-
import io
|
| 4 |
-
import zipfile
|
| 5 |
from pypdf import PdfReader
|
| 6 |
from pdf2image import convert_from_bytes
|
| 7 |
-
import pytesseract
|
|
|
|
| 8 |
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Placeholder for TituLLMs integration
|
| 11 |
def process_text_with_titullm(text):
|
| 12 |
"""Placeholder for TituLLM post-processing."""
|
| 13 |
-
# Replace this with your actual TituLLMs integration.
|
| 14 |
return text
|
| 15 |
|
| 16 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from PIL import Image, UnidentifiedImageError
|
| 3 |
+
import io
|
| 4 |
+
import zipfile
|
| 5 |
from pypdf import PdfReader
|
| 6 |
from pdf2image import convert_from_bytes
|
| 7 |
+
import pytesseract
|
| 8 |
+
import os
|
| 9 |
|
| 10 |
+
# Set the Streamlit config directory explicitly as an environment variable *before* any Streamlit import or usage.
|
| 11 |
+
os.environ["STREAMLIT_CONFIG_PATH"] = "/app/.streamlit"
|
| 12 |
|
| 13 |
# Placeholder for TituLLMs integration
|
| 14 |
def process_text_with_titullm(text):
|
| 15 |
"""Placeholder for TituLLM post-processing."""
|
|
|
|
| 16 |
return text
|
| 17 |
|
| 18 |
|