From c93c9117e3366148a5895dd717ad82e916c5dabe Mon Sep 17 00:00:00 2001 From: Jaewook Lee Date: Thu, 23 Jan 2025 20:53:34 +0900 Subject: [PATCH] UPDATE python to sys.executable --- app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 351e6bb..f189e22 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,6 @@ -# http://localhost:5002 -try: import os, io, tempfile, streamlit -except: os.system('python3 -m pip install -q streamlit') +# 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 if st.runtime.exists(): st.title('맥모닝 OCR') @@ -10,4 +10,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') \ No newline at end of file +else: os.system('streamlit run app.py --browser.gatherUsageStats false --server.fileWatcherType none') \ No newline at end of file