File size: 1,383 Bytes
f3fa404 51d003a a8c1efd a048070 90645d8 821ad4a 51d003a 3156450 affbfdd dfb642b affbfdd 3156450 90645d8 e1dd5a7 3f50db6 e1dd5a7 60937e6 e1dd5a7 60937e6 e1dd5a7 3156450 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
from CODE.PPLUIE.config import model_dict
import gradio as gr
def show_available_llms():
chaine = ""
for k in model_dict.keys():
chaine+="\t"+ k + "\n"
return f"Available models with ParaPLUIE: \n\n{chaine}"
with gr.Blocks() as demo:
gr.Markdown(
"""
# W.I.P
""")
gr.Markdown(
"""
# ParaPLUIE (Paraphrase Generation Evaluation Powered by an LLM)
ParaPLUIE is a metric for evaluating the semantic proximity of two sentences.
ParaPLUIE use the perplexity of an LLM to compute a confidence score.
It has shown the highest correlation with human judgement on paraphrase classification meanwhile reamin the computional cost low as it roughtly equal to one token generation cost.
""")
text_box = gr.Textbox(show_available_llms(), show_label=False)
# with gr.Row():
# gr.Textbox(placeholder="Have you ever seen a tsunami ?", label="Source")
# gr.Textbox(placeholder="Have you ever seen a tiramisu ?", label="Hypothesis")
with gr.Row():
with gr.Column(scale=3):
text1 = gr.Textbox(placeholder="Have you ever seen a tsunami ?", label="Source")
text2 = gr.Textbox(placeholder="Have you ever seen a tiramisu ?", label="Hypothesis")
with gr.Column(scale=1):
btn1 = gr.Button("Compute")
score = gr.Textbox(label="Score")
demo.launch()
|