Spaces:
Runtime error
Runtime error
Commit
·
3cddd30
1
Parent(s):
ec2acd0
updating app.py description
Browse files- app.py +2 -2
- dmx_perplexity/dmx_perplexity.py +0 -1
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def launch_gradio_widget(metric):
|
|
| 22 |
gradio_input_types = infer_gradio_input_types(feature_types)
|
| 23 |
|
| 24 |
def compute(data):
|
| 25 |
-
return metric.compute(
|
| 26 |
|
| 27 |
iface = gr.Interface(
|
| 28 |
fn=compute,
|
|
@@ -34,7 +34,7 @@ def launch_gradio_widget(metric):
|
|
| 34 |
),
|
| 35 |
outputs=gr.Textbox(label=metric.name),
|
| 36 |
description=(
|
| 37 |
-
metric.info.description + "\nIf this is a text-based metric, make sure to wrap you input in double quotes."
|
| 38 |
" Alternatively you can use a JSON-formatted list as input."
|
| 39 |
),
|
| 40 |
title=f"Metric: {metric.name}",
|
|
|
|
| 22 |
gradio_input_types = infer_gradio_input_types(feature_types)
|
| 23 |
|
| 24 |
def compute(data):
|
| 25 |
+
return metric.compute(model = 'distilgpt2',**parse_gradio_data(data, gradio_input_types))
|
| 26 |
|
| 27 |
iface = gr.Interface(
|
| 28 |
fn=compute,
|
|
|
|
| 34 |
),
|
| 35 |
outputs=gr.Textbox(label=metric.name),
|
| 36 |
description=(
|
| 37 |
+
metric.info.description + "\nThis metric is computed using distilgpt2 model.\nIf this is a text-based metric, make sure to wrap you input in double quotes."
|
| 38 |
" Alternatively you can use a JSON-formatted list as input."
|
| 39 |
),
|
| 40 |
title=f"Metric: {metric.name}",
|
dmx_perplexity/dmx_perplexity.py
CHANGED
|
@@ -51,7 +51,6 @@ class DmxPerplexity(evaluate.Metric):
|
|
| 51 |
features=datasets.Features(
|
| 52 |
{
|
| 53 |
"references": datasets.Value("string"),
|
| 54 |
-
"model":datasets.Value("string")
|
| 55 |
}
|
| 56 |
),
|
| 57 |
reference_urls=["https://huggingface.co/docs/transformers/perplexity"],
|
|
|
|
| 51 |
features=datasets.Features(
|
| 52 |
{
|
| 53 |
"references": datasets.Value("string"),
|
|
|
|
| 54 |
}
|
| 55 |
),
|
| 56 |
reference_urls=["https://huggingface.co/docs/transformers/perplexity"],
|