mishrabp commited on
Commit
e58a732
·
verified ·
1 Parent(s): 7a2fae0

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. Dockerfile +12 -16
  2. README.md +3 -3
  3. run.py +3 -2
Dockerfile CHANGED
@@ -1,33 +1,29 @@
1
- # Use official Python slim image
2
  FROM python:3.11-slim
3
 
4
- # Set environment variables
5
  ENV PYTHONUNBUFFERED=1 \
6
- PIP_NO_CACHE_DIR=1 \
7
  DEBIAN_FRONTEND=noninteractive
8
 
9
- # Set working directory
10
  WORKDIR /app
11
 
12
- # Install system dependencies
13
  RUN apt-get update && apt-get install -y \
14
- git \
15
- build-essential \
16
- curl \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
- # Copy requirements file
20
- COPY requirements.txt .
 
21
 
22
- # Install Python dependencies
23
- RUN pip install --upgrade pip
24
- RUN pip install -r requirements.txt
25
 
26
- # Copy the rest of the app
 
 
 
27
  COPY . .
28
 
29
- # Expose port for Streamlit
30
  EXPOSE 7860
31
 
32
- # Command to run the Streamlit app
33
  CMD ["streamlit", "run", "ui/app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"]
 
 
1
  FROM python:3.11-slim
2
 
 
3
  ENV PYTHONUNBUFFERED=1 \
 
4
  DEBIAN_FRONTEND=noninteractive
5
 
 
6
  WORKDIR /app
7
 
8
+ # System deps
9
  RUN apt-get update && apt-get install -y \
10
+ git build-essential curl \
 
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Install uv
14
+ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
15
+ ENV PATH="/root/.local/bin:$PATH"
16
 
17
+ # Copy project metadata
18
+ COPY pyproject.toml .
19
+ COPY uv.lock .
20
 
21
+ # Install dependencies using uv
22
+ RUN uv sync --frozen --no-dev --system
23
+
24
+ # Copy your source code
25
  COPY . .
26
 
 
27
  EXPOSE 7860
28
 
 
29
  CMD ["streamlit", "run", "ui/app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"]
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Market Research AI Chatbot
3
  emoji: 🤖
4
  colorFrom: blue
5
  colorTo: indigo
@@ -9,9 +9,9 @@ app_file: ui/app.py
9
  pinned: false
10
  ---
11
 
12
- # Market Research AI Chatbot
13
 
14
- This chatbot helps you perform **market research tasks** using AI.
15
 
16
  ### Features
17
  - Predefined prompts for quick analysis
 
1
  ---
2
+ title: AI Chatbot
3
  emoji: 🤖
4
  colorFrom: blue
5
  colorTo: indigo
 
9
  pinned: false
10
  ---
11
 
12
+ # AI Chatbot
13
 
14
+ This is a generalized chatbot for chatting with AI. It is equipped with agents & tools to give you realtime data from the web.
15
 
16
  ### Features
17
  - Predefined prompts for quick analysis
run.py CHANGED
@@ -1,9 +1,10 @@
1
  import os
2
  import subprocess
 
3
 
4
- # Run the Streamlit app with automatic reload on file changes
5
  subprocess.run([
6
- "streamlit",
7
  "run",
8
  os.path.join("ui", "app.py"),
9
  "--server.runOnSave", "true"
 
1
  import os
2
  import subprocess
3
+ import sys
4
 
5
+ # Use module execution to guarantee Streamlit runs inside the current interpreter
6
  subprocess.run([
7
+ sys.executable, "-m", "streamlit",
8
  "run",
9
  os.path.join("ui", "app.py"),
10
  "--server.runOnSave", "true"