Spaces:
Sleeping
Sleeping
updated
Browse files- Dockerfile +3 -1
- app.py +3 -0
- requirements.txt +3 -3
- st_app.py +1 -2
Dockerfile
CHANGED
|
@@ -4,7 +4,9 @@ WORKDIR /app
|
|
| 4 |
|
| 5 |
COPY ./requirements.txt /app/requirements.txt
|
| 6 |
|
| 7 |
-
RUN pip3 install --no-cache-dir
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# User
|
| 10 |
RUN useradd -m -u 1000 user
|
|
|
|
| 4 |
|
| 5 |
COPY ./requirements.txt /app/requirements.txt
|
| 6 |
|
| 7 |
+
RUN pip3 install --no-cache-dir --upgrade pip
|
| 8 |
+
RUN pip3 install --no-cache-dir wheel setuptools build
|
| 9 |
+
RUN pip3 install --no-cache-dir --use-pep517 -r /app/requirements.txt
|
| 10 |
|
| 11 |
# User
|
| 12 |
RUN useradd -m -u 1000 user
|
app.py
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from st_app import launch_bot
|
|
|
|
| 3 |
import uuid
|
| 4 |
|
| 5 |
import nest_asyncio
|
| 6 |
import asyncio
|
| 7 |
|
|
|
|
|
|
|
| 8 |
# Setup for HTTP API Calls to Amplitude Analytics
|
| 9 |
if 'device_id' not in st.session_state:
|
| 10 |
st.session_state.device_id = str(uuid.uuid4())
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from st_app import launch_bot
|
| 3 |
+
import torch
|
| 4 |
import uuid
|
| 5 |
|
| 6 |
import nest_asyncio
|
| 7 |
import asyncio
|
| 8 |
|
| 9 |
+
torch.classes.__path__ = []
|
| 10 |
+
|
| 11 |
# Setup for HTTP API Calls to Amplitude Analytics
|
| 12 |
if 'device_id' not in st.session_state:
|
| 13 |
st.session_state.device_id = str(uuid.uuid4())
|
requirements.txt
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
omegaconf==2.3.0
|
| 2 |
python-dotenv==1.0.1
|
| 3 |
-
streamlit==1.
|
| 4 |
-
streamlit_pills==0.3.0
|
| 5 |
streamlit_feedback==0.1.3
|
| 6 |
uuid==1.30
|
| 7 |
langdetect==1.0.9
|
| 8 |
langcodes==3.4.0
|
| 9 |
-
vectara-agentic==0.2.
|
|
|
|
|
|
| 1 |
omegaconf==2.3.0
|
| 2 |
python-dotenv==1.0.1
|
| 3 |
+
streamlit==1.43.2
|
|
|
|
| 4 |
streamlit_feedback==0.1.3
|
| 5 |
uuid==1.30
|
| 6 |
langdetect==1.0.9
|
| 7 |
langcodes==3.4.0
|
| 8 |
+
vectara-agentic==0.2.9
|
| 9 |
+
torch==2.6.0
|
st_app.py
CHANGED
|
@@ -3,7 +3,6 @@ import sys
|
|
| 3 |
import re
|
| 4 |
|
| 5 |
import streamlit as st
|
| 6 |
-
from streamlit_pills import pills
|
| 7 |
from streamlit_feedback import streamlit_feedback
|
| 8 |
|
| 9 |
from utils import thumbs_feedback, escape_dollars_outside_latex, send_amplitude_data
|
|
@@ -15,7 +14,7 @@ initial_prompt = "How can I help you today?"
|
|
| 15 |
|
| 16 |
def show_example_questions():
|
| 17 |
if len(st.session_state.example_messages) > 0 and st.session_state.first_turn:
|
| 18 |
-
selected_example = pills("Queries to Try:", st.session_state.example_messages,
|
| 19 |
if selected_example:
|
| 20 |
st.session_state.ex_prompt = selected_example
|
| 21 |
st.session_state.first_turn = False
|
|
|
|
| 3 |
import re
|
| 4 |
|
| 5 |
import streamlit as st
|
|
|
|
| 6 |
from streamlit_feedback import streamlit_feedback
|
| 7 |
|
| 8 |
from utils import thumbs_feedback, escape_dollars_outside_latex, send_amplitude_data
|
|
|
|
| 14 |
|
| 15 |
def show_example_questions():
|
| 16 |
if len(st.session_state.example_messages) > 0 and st.session_state.first_turn:
|
| 17 |
+
selected_example = st.pills("Queries to Try:", st.session_state.example_messages, default=None)
|
| 18 |
if selected_example:
|
| 19 |
st.session_state.ex_prompt = selected_example
|
| 20 |
st.session_state.first_turn = False
|