Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
import re
|
3 |
-
|
4 |
-
import pip
|
5 |
-
|
6 |
-
import subprocess
|
7 |
-
import sys
|
8 |
-
|
9 |
-
def install(package):
|
10 |
-
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
|
11 |
-
install('transformers')
|
12 |
|
13 |
from transformers import pipeline
|
14 |
|
15 |
-
sp_model =
|
16 |
-
ca_model = "
|
17 |
sp_analysis = pipeline("text-classification", model=sp_model, tokenizer=sp_model)
|
18 |
ca_analysis = pipeline("text-classification", model=ca_model, tokenizer=ca_model)
|
19 |
|
|
|
1 |
import gradio as gr
|
2 |
import re
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
from transformers import pipeline
|
5 |
|
6 |
+
sp_model ="JonatanGk/roberta-base-bne-finetuned-cyberbullying-spanish"
|
7 |
+
ca_model = "JonatanGk/roberta-base-ca-finetuned-cyberbullying-catalan"
|
8 |
sp_analysis = pipeline("text-classification", model=sp_model, tokenizer=sp_model)
|
9 |
ca_analysis = pipeline("text-classification", model=ca_model, tokenizer=ca_model)
|
10 |
|