Spaces:
Sleeping
Sleeping
yangwang825
commited on
Commit
•
27261e8
1
Parent(s):
1ef10ab
Update app.py
Browse files
app.py
CHANGED
@@ -104,10 +104,10 @@ def launch_gradio_widget(metric):
|
|
104 |
(feature_names, feature_types) = zip(*metric.features.items())
|
105 |
gradio_input_types = infer_gradio_input_types(feature_types)
|
106 |
|
107 |
-
def compute(summary,
|
108 |
data = {
|
109 |
"summaries": [summary],
|
110 |
-
"
|
111 |
}
|
112 |
return metric.compute(**data)
|
113 |
# return metric.compute(**parse_gradio_data(data, gradio_input_types))
|
@@ -117,7 +117,7 @@ def launch_gradio_widget(metric):
|
|
117 |
# inputs=["text", "text"],
|
118 |
inputs=[
|
119 |
gr.components.Textbox(label="Summary"),
|
120 |
-
gr.components.Textbox(label="
|
121 |
],
|
122 |
# inputs=gr.components.Dataframe(
|
123 |
# headers=feature_names,
|
|
|
104 |
(feature_names, feature_types) = zip(*metric.features.items())
|
105 |
gradio_input_types = infer_gradio_input_types(feature_types)
|
106 |
|
107 |
+
def compute(summary, document):
|
108 |
data = {
|
109 |
"summaries": [summary],
|
110 |
+
"documents":[document]
|
111 |
}
|
112 |
return metric.compute(**data)
|
113 |
# return metric.compute(**parse_gradio_data(data, gradio_input_types))
|
|
|
117 |
# inputs=["text", "text"],
|
118 |
inputs=[
|
119 |
gr.components.Textbox(label="Summary"),
|
120 |
+
gr.components.Textbox(label="Document")
|
121 |
],
|
122 |
# inputs=gr.components.Dataframe(
|
123 |
# headers=feature_names,
|