DeepVen commited on
Commit
d77742c
1 Parent(s): ecaf0dc

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -0
  2. Index.py +10 -1
Dockerfile CHANGED
@@ -23,6 +23,8 @@ RUN pip install --no-cache-dir --upgrade --user -r /code/requirements.txt
23
  # Set the working directory to the user's home directory
24
  WORKDIR $HOME/app
25
 
 
 
26
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
27
  COPY --chown=user . $HOME/app
28
 
 
23
  # Set the working directory to the user's home directory
24
  WORKDIR $HOME/app
25
 
26
+ EXPOSE 6060
27
+
28
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
29
  COPY --chown=user . $HOME/app
30
 
Index.py CHANGED
@@ -133,6 +133,13 @@ def rag( question: str):
133
  initialize_vectorstore()
134
 
135
 
 
 
 
 
 
 
 
136
 
137
  #import getpass
138
  from pyngrok import ngrok, conf
@@ -141,4 +148,6 @@ conf.get_default().auth_token="2WJNWULs5bCOyJnV24WQYJEKod3_YQUbM5EGCp8sgE4aQvzi"
141
  port = 37689
142
  # Open a ngrok tunnel to the HTTP server
143
  public_url = ngrok.connect(port).public_url
144
- print(" * ngrok tunnel \"{}\" -> \"http://127.0.0.1:{}\"".format(public_url, port))
 
 
 
133
  initialize_vectorstore()
134
 
135
 
136
+ @app.get("/trace")
137
+ def trace():
138
+
139
+ return px.active_session().view()
140
+
141
+
142
+
143
 
144
  #import getpass
145
  from pyngrok import ngrok, conf
 
148
  port = 37689
149
  # Open a ngrok tunnel to the HTTP server
150
  public_url = ngrok.connect(port).public_url
151
+ print(" * ngrok tunnel \"{}\" -> \"http://127.0.0.1:{}\"".format(public_url, port))
152
+
153
+