TochkaMikelya commited on
Commit
89e0dae
·
verified ·
1 Parent(s): 45757d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -27,7 +27,7 @@ def load_model():
27
 
28
  def predict(title: str, abstract: str):
29
  if not title.strip():
30
- raise gr.Error("Введи хотя бы название статьи.")
31
 
32
  load_model()
33
 
@@ -57,12 +57,12 @@ def predict(title: str, abstract: str):
57
  demo = gr.Interface(
58
  fn=predict,
59
  inputs=[
60
- gr.Textbox(label="Название статьи", placeholder="Attention Is All You Need"),
61
- gr.Textbox(label="Abstract (опционально)", placeholder="We propose a new simple network architecture...", lines=5),
62
  ],
63
- outputs=gr.Label(label="Тематики (топ-95%)"),
64
- title="📄 ArXiv Article Classifier",
65
- description="Введи название и/или abstract статьи — получишь топ тематик по таксономии arxiv.",
66
  )
67
 
68
  demo.launch()
 
27
 
28
  def predict(title: str, abstract: str):
29
  if not title.strip():
30
+ raise gr.Error("Нужен как минимум заголовок статьи, введите пожалуйста")
31
 
32
  load_model()
33
 
 
57
  demo = gr.Interface(
58
  fn=predict,
59
  inputs=[
60
+ gr.Textbox(label="Название статьи", placeholder="Заголовок статьи: "),
61
+ gr.Textbox(label="Abstract", placeholder="Abstract статьи: ", lines=5),
62
  ],
63
+ outputs=gr.Label(label="Вероятности классов топ 95%"),
64
+ title="Классификатор статей",
65
+ description="Введи название и abstract статьи, классификация тэга статьи из arxiv",
66
  )
67
 
68
  demo.launch()