Spaces:
Starting
on
T4
Starting
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -163,9 +163,8 @@ def main(query: str, client: QdrantClient, collection_name: str, llm, dense_mode
|
|
163 |
"content": f"Question: {query}"
|
164 |
}
|
165 |
], stop=["</s>"], temperature=0.7)
|
166 |
-
print(response)
|
167 |
|
168 |
-
text = response["choices"][0]["
|
169 |
print(f'TEXT: {text}')
|
170 |
|
171 |
prompt = f"""Q: Write a summary of the following text delimited by triple backquotes that includes the main points and any important details.
|
@@ -185,7 +184,7 @@ def main(query: str, client: QdrantClient, collection_name: str, llm, dense_mode
|
|
185 |
"content": f"""Write a summary of the following text delimited by triple backquotes. Ensure the summary covers the key points of the text.
|
186 |
```{text}```"""
|
187 |
}
|
188 |
-
], stop=["</s>"], temperature=0.7, max_tokens=3000)['choices'][0]['
|
189 |
print(f'OUTPUT: {output}')
|
190 |
return output
|
191 |
|
|
|
163 |
"content": f"Question: {query}"
|
164 |
}
|
165 |
], stop=["</s>"], temperature=0.7)
|
|
|
166 |
|
167 |
+
text = response["choices"][0]["message"]['content']
|
168 |
print(f'TEXT: {text}')
|
169 |
|
170 |
prompt = f"""Q: Write a summary of the following text delimited by triple backquotes that includes the main points and any important details.
|
|
|
184 |
"content": f"""Write a summary of the following text delimited by triple backquotes. Ensure the summary covers the key points of the text.
|
185 |
```{text}```"""
|
186 |
}
|
187 |
+
], stop=["</s>"], temperature=0.7, max_tokens=3000)['choices'][0]['message']['content']
|
188 |
print(f'OUTPUT: {output}')
|
189 |
return output
|
190 |
|