Arni1ntares commited on
Commit
e9cc6ac
·
1 Parent(s): 7a387e9

Initial Streamlit Chatbot using Mistral 7B

Browse files
Files changed (3) hide show
  1. .streamlit/config.toml +5 -0
  2. dockerfile +29 -0
  3. requirements.txt +5 -6
.streamlit/config.toml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ [server]
2
+ headless = true
3
+ port = 7860
4
+ enableCORS = false
5
+ enableXsrfProtection = false
dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python slim base image
2
+ FROM python:3.12-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies for pyttsx3 and SpeechRecognition
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ ffmpeg \
11
+ libasound2-dev \
12
+ libportaudio2 \
13
+ portaudio19-dev \
14
+ pulseaudio \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Copy requirements file and install Python dependencies
18
+ COPY requirements.txt .
19
+ RUN pip install --no-cache-dir --upgrade pip
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy your app code
23
+ COPY . .
24
+
25
+ # Expose port Streamlit runs on
26
+ EXPOSE 8501
27
+
28
+ # Run Streamlit app
29
+ CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
requirements.txt CHANGED
@@ -1,10 +1,9 @@
1
- transformers>=4.38.0
 
 
 
 
2
  torch
3
  fastapi
4
  uvicorn
5
  streamlit
6
- transformers>=4.40.0
7
- torch>=2.1.0
8
- transformers
9
- pyttsx3
10
- SpeechRecognition
 
1
+ streamlit==1.25.0
2
+ torch>=2.1.0
3
+ transformers==4.34.0
4
+ pyttsx3==2.90
5
+ SpeechRecognition==3.8.1
6
  torch
7
  fastapi
8
  uvicorn
9
  streamlit