Rohan Kataria commited on
Commit
46f398d
1 Parent(s): c2d4d42

final changes

Browse files
Files changed (3) hide show
  1. Dockerfile +6 -5
  2. app.py +1 -1
  3. main.py → src/main.py +1 -1
Dockerfile CHANGED
@@ -7,16 +7,17 @@ RUN apt-get update && apt-get install -y \
7
  git \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # This copies everything in your current directory to the /app directory in the container.
11
- COPY . /app
12
-
13
  # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
14
  WORKDIR /app
15
 
 
 
 
16
  # This runs pip install for all the packages listed in your requirements.txt file.
17
  RUN pip install --upgrade pip
18
  RUN pip install -r requirements.txt
19
 
20
- EXPOSE 8501
 
21
 
22
- ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
7
  git \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
 
 
10
  # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
11
  WORKDIR /app
12
 
13
+ # This copies everything in your current directory to the /app directory in the container.
14
+ COPY . /app
15
+
16
  # This runs pip install for all the packages listed in your requirements.txt file.
17
  RUN pip install --upgrade pip
18
  RUN pip install -r requirements.txt
19
 
20
+ #EXPOSE 8501
21
+ #I commented out EXPOSE 8501, and gave 7860 in CMD, since it works. Funny? The building of Streamlit never stops with 8501!!!
22
 
23
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import streamlit as st
2
- from main import ConversationalResponse
3
  import os
4
 
5
  # Constants
 
1
  import streamlit as st
2
+ from src.main import ConversationalResponse
3
  import os
4
 
5
  # Constants
main.py → src/main.py RENAMED
@@ -64,7 +64,7 @@ def retreival(vector_store, k):
64
  #Creating LLM
65
  llm = ChatOllama(
66
  base_url='https://thewise-ollama-server.hf.space',
67
- model="codellama")
68
 
69
  # Define the system message template
70
  #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain
 
64
  #Creating LLM
65
  llm = ChatOllama(
66
  base_url='https://thewise-ollama-server.hf.space',
67
+ model="codellama:34b")
68
 
69
  # Define the system message template
70
  #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain