Spaces:
Runtime error
Runtime error
minor
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ class EntailmentChecker(BaseComponent):
|
|
113 |
"aggregate_entailment_info": aggregate_entailment_info,
|
114 |
}
|
115 |
|
116 |
-
return entailment_checker_result
|
117 |
|
118 |
def run_batch(self, queries: List[str], documents: List[Document]):
|
119 |
entailment_checker_result_batch = []
|
@@ -177,11 +177,7 @@ def start_haystack():
|
|
177 |
|
178 |
return pipe
|
179 |
|
180 |
-
|
181 |
-
global pipe
|
182 |
-
pipe = start_haystack()
|
183 |
-
run = check_statement(statement, retriever_top_k)
|
184 |
-
return run
|
185 |
|
186 |
@st.cache_resource
|
187 |
def check_statement(statement: str, retriever_top_k: int = 5):
|
@@ -256,7 +252,7 @@ def main():
|
|
256 |
st.session_state.statement = statement
|
257 |
with st.spinner(" Procurando a Similaridade no banco de sentenças..."):
|
258 |
try:
|
259 |
-
st.session_state.results =
|
260 |
print(f"S: {statement}")
|
261 |
time_end = time.time()
|
262 |
print(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime()))
|
|
|
113 |
"aggregate_entailment_info": aggregate_entailment_info,
|
114 |
}
|
115 |
|
116 |
+
return entailment_checker_result, "output_1"
|
117 |
|
118 |
def run_batch(self, queries: List[str], documents: List[Document]):
|
119 |
entailment_checker_result_batch = []
|
|
|
177 |
|
178 |
return pipe
|
179 |
|
180 |
+
pipe = start_haystack()
|
|
|
|
|
|
|
|
|
181 |
|
182 |
@st.cache_resource
|
183 |
def check_statement(statement: str, retriever_top_k: int = 5):
|
|
|
252 |
st.session_state.statement = statement
|
253 |
with st.spinner(" Procurando a Similaridade no banco de sentenças..."):
|
254 |
try:
|
255 |
+
st.session_state.results = check_statement(statement, RETRIEVER_TOP_K)
|
256 |
print(f"S: {statement}")
|
257 |
time_end = time.time()
|
258 |
print(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime()))
|