Spaces:
Runtime error
Runtime error
Commit
·
80ae653
1
Parent(s):
3632099
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,16 +44,19 @@ def process(model_A, model_B):
|
|
| 44 |
return prompt,df[df['model'].isin([model_A, model_B])], prefered
|
| 45 |
|
| 46 |
title = "Compare Instruction Models to see which one is more helpful"
|
|
|
|
| 47 |
interface = gr.Interface(fn=process,
|
| 48 |
inputs=[gr.Dropdown(choices=model_list, value=model_list[0], label='Model A'),
|
| 49 |
gr.Dropdown(choices=model_list, value=model_list[1], label='Model B')],
|
| 50 |
outputs=[
|
| 51 |
-
gr.Textbox("Prompt"),
|
| 52 |
gr.DataFrame(label = "Model Responses"),
|
| 53 |
gr.Textbox(label = "Preferred Option"),
|
| 54 |
|
| 55 |
],
|
| 56 |
title=title,
|
|
|
|
|
|
|
| 57 |
)
|
| 58 |
|
| 59 |
interface.launch(debug=True)
|
|
|
|
| 44 |
return prompt,df[df['model'].isin([model_A, model_B])], prefered
|
| 45 |
|
| 46 |
title = "Compare Instruction Models to see which one is more helpful"
|
| 47 |
+
description = "This app compares the outputs of various open-source, instruction-trained models from a [dataset](https://huggingface.co/datasets/{OUTPUTS_DATASET}) of human demonstrations using a reward model trained on the [Stanford Human Preferences Dataset (SHP)] (https://huggingface.co/datasets/stanfordnlp/SHP)"
|
| 48 |
interface = gr.Interface(fn=process,
|
| 49 |
inputs=[gr.Dropdown(choices=model_list, value=model_list[0], label='Model A'),
|
| 50 |
gr.Dropdown(choices=model_list, value=model_list[1], label='Model B')],
|
| 51 |
outputs=[
|
| 52 |
+
gr.Textbox(label = "Prompt"),
|
| 53 |
gr.DataFrame(label = "Model Responses"),
|
| 54 |
gr.Textbox(label = "Preferred Option"),
|
| 55 |
|
| 56 |
],
|
| 57 |
title=title,
|
| 58 |
+
description = description
|
| 59 |
+
|
| 60 |
)
|
| 61 |
|
| 62 |
interface.launch(debug=True)
|