yokesh1999 commited on
Commit
a728fb1
·
verified ·
1 Parent(s): f0b91a3

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. app.py +0 -9
Dockerfile CHANGED
@@ -11,4 +11,4 @@ COPY . .
11
  RUN pip3 install -r requirements.txt
12
 
13
  # Define the command to run the Streamlit app on port 8501 and make it accessible externally
14
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
 
11
  RUN pip3 install -r requirements.txt
12
 
13
  # Define the command to run the Streamlit app on port 8501 and make it accessible externally
14
+ CMD ["streamlit", "run", "app.py", "--server.port", "$PORT", "--server.address", "0.0.0.0", "--server.enableXsrfProtection=false"]
app.py CHANGED
@@ -98,12 +98,3 @@ if file is not None:
98
  except requests.exceptions.RequestException as e:
99
  st.error(f"Error connecting to API: {str(e)}")
100
  st.info("Please ensure your backend API is deployed and the URL is correct.")
101
-
102
- import os
103
- import streamlit.web.cli as stcli
104
- import sys
105
-
106
- if __name__ == "__main__":
107
- port = int(os.environ.get("PORT", 7860))
108
- sys.argv = ["streamlit", "run", "app.py", "--server.address", "0.0.0.0", "--server.port", str(port)]
109
- sys.exit(stcli.main())
 
98
  except requests.exceptions.RequestException as e:
99
  st.error(f"Error connecting to API: {str(e)}")
100
  st.info("Please ensure your backend API is deployed and the URL is correct.")