Spaces:
Sleeping
Sleeping
ljyflores
commited on
Commit
·
06ffb15
1
Parent(s):
d5f4737
Remove caching on predict
Browse files
app.py
CHANGED
@@ -33,9 +33,8 @@ def load(dataset_name, model_variant_name):
|
|
33 |
model=model_dictionary[dataset_name][model_variant_name]
|
34 |
)
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
return _pipeline(text, max_length=768, do_sample=False)
|
39 |
|
40 |
def clean(s):
|
41 |
return s.replace("<s>","").replace("</s>","")
|
|
|
33 |
model=model_dictionary[dataset_name][model_variant_name]
|
34 |
)
|
35 |
|
36 |
+
def predict(text, pipeline):
|
37 |
+
return pipeline(text, max_length=768, do_sample=False)
|
|
|
38 |
|
39 |
def clean(s):
|
40 |
return s.replace("<s>","").replace("</s>","")
|