Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from fastai.text.all import *
|
3 |
-
from blurr.text.modeling.all import
|
4 |
-
|
5 |
-
# Set trust_remote_code=True when loading the SQuAD metric
|
6 |
-
squad_metric = evaluate.load("squad", trust_remote_code=True)
|
7 |
|
8 |
# Load the exported model
|
9 |
learn = load_learner('article_highlights.pkl')
|
@@ -23,4 +20,8 @@ iface = gr.Interface(
|
|
23 |
["Text of an article goes here..."]
|
24 |
]
|
25 |
)
|
26 |
-
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from fastai.text.all import *
|
3 |
+
from blurr.text.modeling.all import load
|
|
|
|
|
|
|
4 |
|
5 |
# Load the exported model
|
6 |
learn = load_learner('article_highlights.pkl')
|
|
|
20 |
["Text of an article goes here..."]
|
21 |
]
|
22 |
)
|
23 |
+
|
24 |
+
# Update: Use load from the evaluate library
|
25 |
+
squad_metric = load("squad")
|
26 |
+
|
27 |
+
iface.launch()
|