abhika-m commited on
Commit
59a028d
β€’
1 Parent(s): e97554e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,10 +39,10 @@ def result(passage, reference):
39
  return f'<div style="font-weight: normal;">{output}</div>'; #output;
40
 
41
  if __name__ == "__main__":
42
- article = """<center><img src="https://github.com/abhika-m/researchpapers/blob/main/fava.png?raw=true" alt="Example Image"></center>"""
43
  examples = [["Canada's oldest national park, Banff, was established in 1886. It recently won a Nature's Choice 2023 award for its beautiful mountainous terrain. It's the best national park ever.",
44
  "Banff National Park is Canada's oldest national park, established in 1885 as Rocky Mountains Park. Located in Alberta's Rocky Mountains, 110–180 kilometres (68–112 mi) west of Calgary, Banff encompasses 6,641 square kilometres (2,564 sq mi) of mountainous terrain."]]
45
  demo = gradio.Interface(fn=result, inputs=["text", "text"], outputs="html", title="Fine-grained Hallucination Detection and Editing (FAVA)",
46
- description="Enter some text and a reference for the text and FAVA will detect and edit any hallucinations present.", article=article,
47
  examples=examples, allow_flagging="manual", flagging_options=["wrong detection", "wrong editing", "both wrong", "other"], flagging_dir="flags")
48
  demo.launch(share=True)
 
39
  return f'<div style="font-weight: normal;">{output}</div>'; #output;
40
 
41
  if __name__ == "__main__":
42
+ article = """<center><img src="https://github.com/abhika-m/researchpapers/blob/main/fava.png?raw=true" alt="Example Image" width=500px></center>"""
43
  examples = [["Canada's oldest national park, Banff, was established in 1886. It recently won a Nature's Choice 2023 award for its beautiful mountainous terrain. It's the best national park ever.",
44
  "Banff National Park is Canada's oldest national park, established in 1885 as Rocky Mountains Park. Located in Alberta's Rocky Mountains, 110–180 kilometres (68–112 mi) west of Calgary, Banff encompasses 6,641 square kilometres (2,564 sq mi) of mountainous terrain."]]
45
  demo = gradio.Interface(fn=result, inputs=["text", "text"], outputs="html", title="Fine-grained Hallucination Detection and Editing (FAVA)",
46
+ description="Given a passage and a reference, FAVA will detect and edit any hallucinations present in the passage.", article=article,
47
  examples=examples, allow_flagging="manual", flagging_options=["wrong detection", "wrong editing", "both wrong", "other"], flagging_dir="flags")
48
  demo.launch(share=True)