Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -744,7 +744,7 @@ def check_precision(state: Dict) -> Dict:
|
|
| 744 |
("user", "Query: {query}\nResponse: {response}\n\nPrecision score:")
|
| 745 |
])
|
| 746 |
|
| 747 |
-
chain =
|
| 748 |
precision_score = float(chain.invoke({
|
| 749 |
"query": state['query'],
|
| 750 |
"response":state['response'] # Complete the code to access the response from the state
|
|
|
|
| 744 |
("user", "Query: {query}\nResponse: {response}\n\nPrecision score:")
|
| 745 |
])
|
| 746 |
|
| 747 |
+
chain = precision_prompt | llm | StrOutputParser() # Complete the code to define the chain of processing
|
| 748 |
precision_score = float(chain.invoke({
|
| 749 |
"query": state['query'],
|
| 750 |
"response":state['response'] # Complete the code to access the response from the state
|