Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,7 +56,7 @@ def retrieve_neighbors(query, sbert_model, faiss_index, dataset, num_neighbors=5
|
|
| 56 |
|
| 57 |
# Step 4: Generate Response using GPT-4 and Context
|
| 58 |
def generate_response_gpt4(query, context_snippets, max_tokens=850, temperature=0.7):
|
| 59 |
-
context = " ".join(context_snippets
|
| 60 |
input_text = f"Q: {query}\nHere is some relevant information:\n{context}\nBased on this information, provide a unique answer to the question."
|
| 61 |
|
| 62 |
try:
|
|
|
|
| 56 |
|
| 57 |
# Step 4: Generate Response using GPT-4 and Context
|
| 58 |
def generate_response_gpt4(query, context_snippets, max_tokens=850, temperature=0.7):
|
| 59 |
+
context = " ".join(context_snippets)
|
| 60 |
input_text = f"Q: {query}\nHere is some relevant information:\n{context}\nBased on this information, provide a unique answer to the question."
|
| 61 |
|
| 62 |
try:
|