devve1 commited on
Commit
856a4a9
1 Parent(s): 92cad4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- return output["choices"][0]["text"]
 
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():