Spaces:
Runtime error
Runtime error
Heiko Hotz
commited on
Commit
·
092c7c9
1
Parent(s):
b5ad754
Add application file
Browse files
app.py
CHANGED
@@ -1,7 +1,13 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
|
|
5 |
|
6 |
-
iface = gr.Interface(
|
|
|
|
|
|
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from rouge_score import rouge_scorer
|
3 |
|
4 |
+
def calc_rouge_score(summary, reference):
|
5 |
+
score = 0.6
|
6 |
+
text = "The core is %s" % (score)
|
7 |
+
return text, score
|
8 |
|
9 |
+
iface = gr.Interface(
|
10 |
+
fn=calc_rouge_score,
|
11 |
+
inputs=["text", "text"],
|
12 |
+
outputs=["text", "score"])
|
13 |
iface.launch()
|