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