Spaces:
Starting
on
T4
Starting
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -163,6 +163,7 @@ def main(query: str, client: QdrantClient, collection_name: str, llm, dense_mode
|
|
163 |
response = llm(template, stop=["Q:", "\n"], temperature=0.7)
|
164 |
|
165 |
text = response["choices"][0]["text"]
|
|
|
166 |
|
167 |
prompt = f"""Q: Write a summary of the following text delimited by triple backquotes that includes the main points and any important details.
|
168 |
Return your response in bullet points which covers the key points of the text.
|
@@ -170,8 +171,9 @@ def main(query: str, client: QdrantClient, collection_name: str, llm, dense_mode
|
|
170 |
A :
|
171 |
"""
|
172 |
|
173 |
-
output = llm(prompt, stop=["Q:", "\n"], temperature=0.7, max_tokens=3000)
|
174 |
-
|
|
|
175 |
|
176 |
@st.cache_resource
|
177 |
def load_models_and_documents():
|
|
|
163 |
response = llm(template, stop=["Q:", "\n"], temperature=0.7)
|
164 |
|
165 |
text = response["choices"][0]["text"]
|
166 |
+
print(f'TEXT: {text}')
|
167 |
|
168 |
prompt = f"""Q: Write a summary of the following text delimited by triple backquotes that includes the main points and any important details.
|
169 |
Return your response in bullet points which covers the key points of the text.
|
|
|
171 |
A :
|
172 |
"""
|
173 |
|
174 |
+
output = llm(prompt, stop=["Q:", "\n"], temperature=0.7, max_tokens=3000)['choices'][0]['text']
|
175 |
+
print(f'OUTPUT: {output}')
|
176 |
+
return output
|
177 |
|
178 |
@st.cache_resource
|
179 |
def load_models_and_documents():
|