Yehor commited on
Commit
e61efde
·
verified ·
1 Parent(s): a4b1927

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,9 +2,9 @@ import gradio as gr
2
 
3
  from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
4
 
5
- tokenizer = AutoTokenizer.from_pretrained("ukr-models/xlm-roberta-base-uk")
6
  model = AutoModelForSequenceClassification.from_pretrained(
7
- "ua-l/topics-classifier-xlm-roberta-base-uk-v2"
8
  )
9
 
10
  topic_classifier = pipeline(
@@ -28,7 +28,7 @@ def predict(question):
28
 
29
  return topics
30
 
31
- inputs = gr.Textbox(lines=2, label="Enter the text", value="Як отримати виплати ВПО?")
32
 
33
  outputs = gr.JSON(label="Output")
34
 
 
2
 
3
  from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
4
 
5
+ tokenizer = AutoTokenizer.from_pretrained("ua-l/is-legal-question")
6
  model = AutoModelForSequenceClassification.from_pretrained(
7
+ "ua-l/is-legal-question"
8
  )
9
 
10
  topic_classifier = pipeline(
 
28
 
29
  return topics
30
 
31
+ inputs = gr.Textbox(lines=2, label="Enter the question", value="Як отримати виплати ВПО?")
32
 
33
  outputs = gr.JSON(label="Output")
34