Spaces:
Sleeping
Sleeping
update app
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification
|
|
8 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
9 |
from json import JSONEncoder
|
10 |
from faker import Faker
|
11 |
-
|
12 |
class out_json():
|
13 |
def __init__(self, w,l):
|
14 |
self.word = w
|
@@ -339,10 +339,12 @@ def procesar(texto,archivo):
|
|
339 |
|
340 |
df_new[item] = modelo.unir(out)
|
341 |
plotting_df=gr.Dataframe(value=df_new,headers=["nombre","trabajo"],label="label:",type="pandas", visible=True, interactive=False)
|
|
|
342 |
print(df_new)
|
343 |
return plotting_df
|
344 |
|
345 |
demo = gr.Interface(fn=procesar,inputs=["text",gr.File()] , outputs="text")
|
|
|
346 |
demo.launch(share=True)
|
347 |
|
348 |
#plotting_df=gr.Dataframe(value=df2,headers="class","type","group","ε54Cr","ε50Ti","ε94Mo"],
|
|
|
8 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
9 |
from json import JSONEncoder
|
10 |
from faker import Faker
|
11 |
+
from keras.utils import pad_sequences
|
12 |
class out_json():
|
13 |
def __init__(self, w,l):
|
14 |
self.word = w
|
|
|
339 |
|
340 |
df_new[item] = modelo.unir(out)
|
341 |
plotting_df=gr.Dataframe(value=df_new,headers=["nombre","trabajo"],label="label:",type="pandas", visible=True, interactive=False)
|
342 |
+
|
343 |
print(df_new)
|
344 |
return plotting_df
|
345 |
|
346 |
demo = gr.Interface(fn=procesar,inputs=["text",gr.File()] , outputs="text")
|
347 |
+
#gr.Interface(fn=scraper_obj.scrape, inputs='text', outputs=gr.Dataframe(headers=['title', 'author', 'text']), allow_flagging='never').launch()
|
348 |
demo.launch(share=True)
|
349 |
|
350 |
#plotting_df=gr.Dataframe(value=df2,headers="class","type","group","ε54Cr","ε50Ti","ε94Mo"],
|