nanoapple commited on
Commit
2d830bb
·
verified ·
1 Parent(s): e4a5925

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -7,6 +7,9 @@ from pathlib import Path
7
  import streamlit as st
8
  import langextract as lx # pip: langextract[openai]
9
 
 
 
 
10
  st.set_page_config(page_title="LangmyOCR (Streamlit)", layout="wide")
11
  st.title("LangmyOCR: OCRmyPDF + LangExtract (Streamlit Demo)")
12
  st.caption("先 OCR,后(可选)结构化抽取与交互式复核。数据仅用于会话处理。")
 
7
  import streamlit as st
8
  import langextract as lx # pip: langextract[openai]
9
 
10
+ # 修复权限问题:设置 Streamlit 配置目录
11
+ os.environ['STREAMLIT_CONFIG_DIR'] = tempfile.gettempdir()
12
+
13
  st.set_page_config(page_title="LangmyOCR (Streamlit)", layout="wide")
14
  st.title("LangmyOCR: OCRmyPDF + LangExtract (Streamlit Demo)")
15
  st.caption("先 OCR,后(可选)结构化抽取与交互式复核。数据仅用于会话处理。")