REFACTOR app.py
This commit is contained in:
3
app.py
3
app.py
@@ -1,4 +1,3 @@
|
||||
# http://localhost:8501
|
||||
try: import os, sys, io, tempfile, streamlit
|
||||
except: os.system(f'{sys.executable} -m pip install -q streamlit')
|
||||
finally: import streamlit as st
|
||||
@@ -10,4 +9,4 @@ if st.runtime.exists():
|
||||
open(path := f'{tmp}/{img.name}', 'wb') as f:
|
||||
f.write(blob)
|
||||
st.code(os.popen(f'osascript ocr.applescript {path}').read())
|
||||
else: os.system('streamlit run app.py --browser.gatherUsageStats false --server.fileWatcherType none')
|
||||
else: os.system('streamlit run app.py --browser.gatherUsageStats false')
|
||||
Reference in New Issue
Block a user