update
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -1,7 +1,11 @@ 
     | 
|
| 1 | 
         
             
            import gradio as gr
         
     | 
| 
         | 
|
| 2 | 
         | 
| 3 | 
         
            -
            def  
     | 
| 4 | 
         
            -
                 
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 5 | 
         | 
| 6 | 
         
             
            with gr.Blocks() as demo:
         
     | 
| 7 | 
         
             
                gr.Markdown(
         
     | 
| 
         @@ -15,8 +19,6 @@ with gr.Blocks() as demo: 
     | 
|
| 15 | 
         
             
                ParaPLUIE use the perplexity of an LLM to compute a confidence score.
         
     | 
| 16 | 
         
             
                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.
         
     | 
| 17 | 
         
             
                """)
         
     | 
| 18 | 
         
            -
                 
     | 
| 19 | 
         
            -
                out = gr.Textbox()
         
     | 
| 20 | 
         
            -
                inp.change(welcome, inp, out)
         
     | 
| 21 | 
         | 
| 22 | 
         
             
            demo.launch()
         
     | 
| 
         | 
|
| 1 | 
         
             
            import gradio as gr
         
     | 
| 2 | 
         
            +
            from code.PPLUIE.config import model_dict
         
     | 
| 3 | 
         | 
| 4 | 
         
            +
            def show_available_llms():
         
     | 
| 5 | 
         
            +
                chaine = ""
         
     | 
| 6 | 
         
            +
                for k in model_dict.keys()
         
     | 
| 7 | 
         
            +
                chaine+=k + "\n"
         
     | 
| 8 | 
         
            +
                return f"Available models with ParaPLUIE: \n"
         
     | 
| 9 | 
         | 
| 10 | 
         
             
            with gr.Blocks() as demo:
         
     | 
| 11 | 
         
             
                gr.Markdown(
         
     | 
| 
         | 
|
| 19 | 
         
             
                ParaPLUIE use the perplexity of an LLM to compute a confidence score.
         
     | 
| 20 | 
         
             
                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.
         
     | 
| 21 | 
         
             
                """)
         
     | 
| 22 | 
         
            +
                out = gr.Textbox(show_available_llms())
         
     | 
| 
         | 
|
| 
         | 
|
| 23 | 
         | 
| 24 | 
         
             
            demo.launch()
         
     |