Update app.py
Browse files
app.py
CHANGED
@@ -1,27 +1,14 @@
|
|
1 |
-
import torch
|
2 |
import numpy as np
|
3 |
-
import sys
|
4 |
-
import os
|
5 |
from transformers import RobertaTokenizer, AutoModelForTokenClassification, RobertaForSequenceClassification
|
6 |
import spacy
|
7 |
-
|
8 |
-
os.system('git clone https://github.com/tamuhey/tokenizations')
|
9 |
-
os.system('cd tokenizations/python')
|
10 |
-
os.system('pip install maturin')
|
11 |
-
os.system('maturin build')
|
12 |
-
os.system('pip install *whl')
|
13 |
-
import spacy_alignments as tokenizations
|
14 |
-
from numpy import asarray
|
15 |
-
from numpy import savetxt, loadtxt
|
16 |
import numpy as np
|
17 |
-
import json
|
18 |
from copy import deepcopy
|
19 |
-
|
20 |
-
import re
|
21 |
-
from tqdm import tqdm
|
22 |
import gradio as gr
|
23 |
from matplotlib import pyplot as plt
|
24 |
import seaborn as sns
|
|
|
25 |
|
26 |
os.system("python -m spacy download en_core_web_sm")
|
27 |
nlp = spacy.load("en_core_web_sm")
|
|
|
|
|
1 |
import numpy as np
|
|
|
|
|
2 |
from transformers import RobertaTokenizer, AutoModelForTokenClassification, RobertaForSequenceClassification
|
3 |
import spacy
|
4 |
+
import tokenizations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
import numpy as np
|
|
|
6 |
from copy import deepcopy
|
7 |
+
import pydantic
|
|
|
|
|
8 |
import gradio as gr
|
9 |
from matplotlib import pyplot as plt
|
10 |
import seaborn as sns
|
11 |
+
import os
|
12 |
|
13 |
os.system("python -m spacy download en_core_web_sm")
|
14 |
nlp = spacy.load("en_core_web_sm")
|