Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,7 @@ INPUT = "Read the following references:\n{evidence}\nPlease identify all the err
|
|
13 |
model = vllm.LLM(model="fava-uw/fava-model")
|
14 |
def result(passage, reference):
|
15 |
prompt = [INPUT.format_map({"evidence":reference, "output":passage})]
|
|
|
16 |
sampling_params = vllm.SamplingParams(
|
17 |
temperature=0,
|
18 |
top_p=1.0,
|
@@ -33,9 +34,9 @@ def result(passage, reference):
|
|
33 |
output = output.replace("</entity>", "")
|
34 |
output = output.replace("</relation>", "")
|
35 |
output = output.replace("</contradictory>", "")
|
36 |
-
output = output.replace("</
|
37 |
output = output.replace("</invented>", "")
|
38 |
-
output = output.replace("</
|
39 |
output = output.replace("Edited:", "")
|
40 |
return f'<div style="font-weight: normal;">{output}</div>'; #output;
|
41 |
|
|
|
13 |
model = vllm.LLM(model="fava-uw/fava-model")
|
14 |
def result(passage, reference):
|
15 |
prompt = [INPUT.format_map({"evidence":reference, "output":passage})]
|
16 |
+
print(prompt)
|
17 |
sampling_params = vllm.SamplingParams(
|
18 |
temperature=0,
|
19 |
top_p=1.0,
|
|
|
34 |
output = output.replace("</entity>", "")
|
35 |
output = output.replace("</relation>", "")
|
36 |
output = output.replace("</contradictory>", "")
|
37 |
+
output = output.replace("</unverifiable>", "</u>")
|
38 |
output = output.replace("</invented>", "")
|
39 |
+
output = output.replace("</subjective>", "</u>")
|
40 |
output = output.replace("Edited:", "")
|
41 |
return f'<div style="font-weight: normal;">{output}</div>'; #output;
|
42 |
|