EkhiAzur commited on
Commit
11e71f5
1 Parent(s): 3659c6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -16,8 +16,8 @@ tokenizer = AutoTokenizer.from_pretrained(
16
  classifier = pipeline("text-classification", tokenizer=tokenizer, model=model, max_length=512,
17
  padding=True, truncation=True, batch_size=1)
18
 
19
- def prozesatu(testua):
20
- prediction = prozesatu.classifier(testua)[0]
21
  if prediction["label"]=="GAI":
22
  return {"Gai":prediction["score"], "Ez gai": 1-prediction["score"]}
23
  else:
@@ -29,8 +29,8 @@ prozesatu.classifier = classifier
29
  demo = gr.Interface(
30
  fn=prozesatu,
31
  inputs=gr.Textbox(placeholder="Idatzi hemen testua..."),
32
- outputs="label",
33
  interpretation="default",
34
- examples=[["Gaur egungo teknologiak bikainak dira..."]]).launch()
35
 
36
  #gr.Interface(fn=prozesatu, inputs="text", outputs="text").launch()
 
16
  classifier = pipeline("text-classification", tokenizer=tokenizer, model=model, max_length=512,
17
  padding=True, truncation=True, batch_size=1)
18
 
19
+ def prozesatu(Testua):
20
+ prediction = prozesatu.classifier(Testua)[0]
21
  if prediction["label"]=="GAI":
22
  return {"Gai":prediction["score"], "Ez gai": 1-prediction["score"]}
23
  else:
 
29
  demo = gr.Interface(
30
  fn=prozesatu,
31
  inputs=gr.Textbox(placeholder="Idatzi hemen testua..."),
32
+ outputs="C1",
33
  interpretation="default",
34
+ examples=[["Gaur egungo teknologiak bikainak dira..."]]).launch(share=True)
35
 
36
  #gr.Interface(fn=prozesatu, inputs="text", outputs="text").launch()