Roger Surf commited on
Commit
a83f0da
·
1 Parent(s): 100f669

feat: add Dockerfile - app working in container

Browse files
Files changed (5) hide show
  1. .dockerignore +7 -0
  2. Dockerfile +16 -0
  3. app.py +1 -1
  4. requirements.txt +2 -4
  5. utils/display.py +1 -1
.dockerignore ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ venv/
2
+ __pycache__/
3
+ *.pyc
4
+ .git/
5
+ .gitignore
6
+ *.md
7
+ api/
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Copia arquivos
6
+ COPY requirements.txt .
7
+ COPY . .
8
+
9
+ # Instala dependências
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Expõe porta HF Spaces
13
+ EXPOSE 7860
14
+
15
+ # Roda Streamlit
16
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
app.py CHANGED
@@ -129,7 +129,7 @@ def render_sidebar():
129
  """Render sidebar with controls and information."""
130
 
131
  with st.sidebar:
132
- st.image("https://via.placeholder.com/250x80/0066CC/FFFFFF?text=HRHUB", use_container_width=True)
133
 
134
  st.markdown("---")
135
 
 
129
  """Render sidebar with controls and information."""
130
 
131
  with st.sidebar:
132
+ st.image("https://via.placeholder.com/250x80/0066CC/FFFFFF?text=HRHUB", width=250)
133
 
134
  st.markdown("---")
135
 
requirements.txt CHANGED
@@ -1,7 +1,5 @@
1
- streamlit==1.31.0
2
  pandas==2.1.4
3
  numpy==1.26.3
4
- plotly==5.18.0
5
  pyvis==0.3.2
6
- scikit-learn==1.4.0
7
- sentence-transformers==2.3.1
 
1
+ streamlit==1.40.0
2
  pandas==2.1.4
3
  numpy==1.26.3
 
4
  pyvis==0.3.2
5
+ scikit-learn==1.4.0
 
utils/display.py CHANGED
@@ -182,7 +182,7 @@ def display_match_table(
182
  # Style the dataframe
183
  st.dataframe(
184
  df,
185
- width='stretch',
186
  hide_index=True,
187
  column_config={
188
  "Rank": st.column_config.TextColumn(width="small"),
 
182
  # Style the dataframe
183
  st.dataframe(
184
  df,
185
+ use_container_width=True,
186
  hide_index=True,
187
  column_config={
188
  "Rank": st.column_config.TextColumn(width="small"),