yaki.umflat commited on
Commit
130f21c
·
1 Parent(s): c1a8e16

Add application file

Browse files
Files changed (3) hide show
  1. Dockerfile +8 -0
  2. app.py +9 -0
  3. requirements.txt +2 -0
Dockerfile ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.8
2
+ WORKDIR /app
3
+ COPY requirements.txt ./requirements.txt
4
+ RUN pip install -r requirements.txt
5
+ EXPOSE 8501
6
+ COPY . /app
7
+ #ENTRYPOINT ["streamlit", "run"]
8
+ CMD ["streamlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ st.title("A Simple Streamlit Web App")
4
+ name = st.text_input("Enter your name", "")
5
+ st.write(f"Hello {name}!")
6
+ x = st.slider("Select an integer x", 0, 10, 1)
7
+ y = st.slider("Select an integer y", 0, 10, 1)
8
+ df = pd.DataFrame({"x": [x], "y": [y] , "x + y": [x + y]}, index = ["addition row"])
9
+ st.write(df)
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ pandas
2
+ streamlit