Spaces:
Runtime error
Runtime error
revert to python3.9
Browse files- Dockerfile +1 -1
- app.py +10 -9
- chainlit.md +4 -1
- youtube_to_docstore.py +2 -2
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
FROM python:3.
|
2 |
RUN useradd -m -u 1000 user
|
3 |
USER user
|
4 |
ENV HOME=/home/user \
|
|
|
1 |
+
FROM python:3.9
|
2 |
RUN useradd -m -u 1000 user
|
3 |
USER user
|
4 |
ENV HOME=/home/user \
|
app.py
CHANGED
@@ -24,15 +24,14 @@ CONTEXT:
|
|
24 |
QUERY:
|
25 |
{question}
|
26 |
|
27 |
-
You are a helpful assistant
|
28 |
-
and succint information. Your answers are accurate
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
please state your question and what kind of service or
|
36 |
support you are seeking."
|
37 |
"""
|
38 |
|
@@ -77,6 +76,8 @@ async def on_message(message: cl.Message):
|
|
77 |
link = metadata["link"]
|
78 |
title = metadata["source_document"]
|
79 |
|
|
|
|
|
80 |
formatted_response = f"""
|
81 |
{response['answer']} Check out the Youtube video [{title}] ({link})!
|
82 |
"""
|
|
|
24 |
QUERY:
|
25 |
{question}
|
26 |
|
27 |
+
You are a helpful physical therapy assistant. You provide summarized
|
28 |
+
and succint information. Your answers are accurate and thorough.
|
29 |
+
You will be presented with a question helping
|
30 |
+
one of our physical therapist clients, and your job is to be as detailed
|
31 |
+
and as helpful as possible. If the context provided
|
32 |
+
doesn't answer the question, please respond with: "I
|
33 |
+
require more information in order to better assist you,
|
34 |
+
please state your question and what kind of service or
|
|
|
35 |
support you are seeking."
|
36 |
"""
|
37 |
|
|
|
76 |
link = metadata["link"]
|
77 |
title = metadata["source_document"]
|
78 |
|
79 |
+
print(response['answer'])
|
80 |
+
|
81 |
formatted_response = f"""
|
82 |
{response['answer']} Check out the Youtube video [{title}] ({link})!
|
83 |
"""
|
chainlit.md
CHANGED
@@ -9,4 +9,7 @@ Examples:
|
|
9 |
- As a physical therapist, how do I hire the right employee?
|
10 |
- Is being a traveling physical therapist a good idea?
|
11 |
- How do I grow my physical therapy practice to six figures?
|
12 |
-
- What is the most difficult thing about growing your income as a physical therapist?
|
|
|
|
|
|
|
|
9 |
- As a physical therapist, how do I hire the right employee?
|
10 |
- Is being a traveling physical therapist a good idea?
|
11 |
- How do I grow my physical therapy practice to six figures?
|
12 |
+
- What is the most difficult thing about growing your income as a physical therapist?
|
13 |
+
- Why should I hire a virtual assistant?
|
14 |
+
- Is it a good idea to scale to multiple locations?
|
15 |
+
- What do I need to know about HIPPA before I start my own practice?
|
youtube_to_docstore.py
CHANGED
@@ -114,7 +114,7 @@ def configure_vector_database():
|
|
114 |
|
115 |
if INDEX_NAME not in pc.list_indexes().names():
|
116 |
pc.create_index(
|
117 |
-
|
118 |
metric='cosine',
|
119 |
dimension=1536,
|
120 |
spec=ServerlessSpec(
|
@@ -122,7 +122,7 @@ def configure_vector_database():
|
|
122 |
)
|
123 |
)
|
124 |
|
125 |
-
index = pc.Index(INDEX_NAME)
|
126 |
store = LocalFileStore("./cache/")
|
127 |
# default model is text-embedding-ada-002
|
128 |
core_embeddings_model = OpenAIEmbeddings()
|
|
|
114 |
|
115 |
if INDEX_NAME not in pc.list_indexes().names():
|
116 |
pc.create_index(
|
117 |
+
index=os.getenv("INDEX_NAME"),
|
118 |
metric='cosine',
|
119 |
dimension=1536,
|
120 |
spec=ServerlessSpec(
|
|
|
122 |
)
|
123 |
)
|
124 |
|
125 |
+
index = pc.Index(os.getenv("INDEX_NAME"))
|
126 |
store = LocalFileStore("./cache/")
|
127 |
# default model is text-embedding-ada-002
|
128 |
core_embeddings_model = OpenAIEmbeddings()
|