kaushikbar commited on
Commit
2a26975
1 Parent(s): 7b69afb

back to ;; with examples also changed accordingly

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -42,36 +42,36 @@ def prep_examples():
42
  example_text1 = "Coronavirus disease (COVID-19) is an infectious disease caused by the SARS-CoV-2 virus. Most \
43
  people who fall sick with COVID-19 will experience mild to moderate symptoms and recover without special treatment. \
44
  However, some will become seriously ill and require medical attention."
45
- example_labels1 = "business,health related,politics,climate change"
46
 
47
  example_text2 = "Elephants are"
48
- example_labels2 = "big,small,strong,fast,carnivorous"
49
 
50
  example_text3 = "Elephants"
51
- example_labels3 = "are big,can be very small,generally not strong enough,are faster than you think"
52
 
53
  example_text4 = "Dogs are man's best friend"
54
- example_labels4 = "positive,negative,neutral"
55
 
56
  example_text5 = "Şampiyonlar Ligi’nde 5. hafta oynanan karşılaşmaların ardından sona erdi. Real Madrid, \
57
  Inter ve Sporting oynadıkları mücadeleler sonrasında Son 16 turuna yükselmeyi başardı. \
58
  Gecenin dev mücadelesinde ise Manchester City, PSG’yi yenerek liderliği garantiledi."
59
- example_labels5 = "dünya,ekonomi,kültür,siyaset,spor,teknoloji"
60
 
61
  example_text6 = "Letzte Woche gab es einen Selbstmord in einer nahe gelegenen kolonie"
62
- example_labels6 = "verbrechen,tragödie,stehlen"
63
 
64
  example_text7 = "El autor se perfila, a los 50 años de su muerte, como uno de los grandes de su siglo"
65
- example_labels7 = "cultura,sociedad,economia,salud,deportes"
66
 
67
  example_text8 = "Россия в среду заявила, что военные учения в аннексированном Москвой Крыму закончились \
68
  и что солдаты возвращаются в свои гарнизоны, на следующий день после того, как она объявила о первом выводе \
69
  войск от границ Украины."
70
- example_labels8 = "новости,комедия"
71
 
72
  example_text9 = "I quattro registi - Federico Fellini, Pier Paolo Pasolini, Bernardo Bertolucci e Vittorio De Sica - \
73
  hanno utilizzato stili di ripresa diversi, ma hanno fortemente influenzato le giovani generazioni di registi."
74
- example_labels9 = "cinema,politica,cibo"
75
 
76
  example_text10 = "Ja, vi elsker dette landet,\
77
  som det stiger frem,\
@@ -79,10 +79,10 @@ def prep_examples():
79
  med de tusen hjem.\
80
  Og som fedres kamp har hevet\
81
  det av nød til seir"
82
- example_labels10 = "helse,sport,religion,mat,patriotisme og nasjonalisme"
83
 
84
  example_text11 = "Amar sonar bangla ami tomay bhalobasi"
85
- example_labels11 = "bhalo,kharap"
86
 
87
  examples = [
88
  [example_text1, example_labels1],
@@ -165,8 +165,8 @@ iface = gr.Interface(
165
  label="Please enter the text you would like to classify...",
166
  placeholder="Text here..."),
167
  gr.inputs.Textbox(lines=2,
168
- label="Please enter the candidate labels (separated by commas)...",
169
- placeholder="Labels here separated by commas")],
170
  outputs=gr.outputs.Label(num_top_classes=5),
171
  #interpretation="default",
172
  examples=prep_examples())
 
42
  example_text1 = "Coronavirus disease (COVID-19) is an infectious disease caused by the SARS-CoV-2 virus. Most \
43
  people who fall sick with COVID-19 will experience mild to moderate symptoms and recover without special treatment. \
44
  However, some will become seriously ill and require medical attention."
45
+ example_labels1 = "business;;health related;;politics;;climate change"
46
 
47
  example_text2 = "Elephants are"
48
+ example_labels2 = "big;;small;;strong;;fast;;carnivorous"
49
 
50
  example_text3 = "Elephants"
51
+ example_labels3 = "are big;;can be very small;;generally not strong enough;;are faster than you think"
52
 
53
  example_text4 = "Dogs are man's best friend"
54
+ example_labels4 = "positive;;negative;;neutral"
55
 
56
  example_text5 = "Şampiyonlar Ligi’nde 5. hafta oynanan karşılaşmaların ardından sona erdi. Real Madrid, \
57
  Inter ve Sporting oynadıkları mücadeleler sonrasında Son 16 turuna yükselmeyi başardı. \
58
  Gecenin dev mücadelesinde ise Manchester City, PSG’yi yenerek liderliği garantiledi."
59
+ example_labels5 = "dünya;;ekonomi;;kültür;;siyaset;;spor;;teknoloji"
60
 
61
  example_text6 = "Letzte Woche gab es einen Selbstmord in einer nahe gelegenen kolonie"
62
+ example_labels6 = "verbrechen;;tragödie;;stehlen"
63
 
64
  example_text7 = "El autor se perfila, a los 50 años de su muerte, como uno de los grandes de su siglo"
65
+ example_labels7 = "cultura;;sociedad;;economia;;salud;;deportes"
66
 
67
  example_text8 = "Россия в среду заявила, что военные учения в аннексированном Москвой Крыму закончились \
68
  и что солдаты возвращаются в свои гарнизоны, на следующий день после того, как она объявила о первом выводе \
69
  войск от границ Украины."
70
+ example_labels8 = "новости;;комедия"
71
 
72
  example_text9 = "I quattro registi - Federico Fellini, Pier Paolo Pasolini, Bernardo Bertolucci e Vittorio De Sica - \
73
  hanno utilizzato stili di ripresa diversi, ma hanno fortemente influenzato le giovani generazioni di registi."
74
+ example_labels9 = "cinema;;politica;;cibo"
75
 
76
  example_text10 = "Ja, vi elsker dette landet,\
77
  som det stiger frem,\
 
79
  med de tusen hjem.\
80
  Og som fedres kamp har hevet\
81
  det av nød til seir"
82
+ example_labels10 = "helse;;sport;;religion;;mat;;patriotisme og nasjonalisme"
83
 
84
  example_text11 = "Amar sonar bangla ami tomay bhalobasi"
85
+ example_labels11 = "bhalo;;kharap"
86
 
87
  examples = [
88
  [example_text1, example_labels1],
 
165
  label="Please enter the text you would like to classify...",
166
  placeholder="Text here..."),
167
  gr.inputs.Textbox(lines=2,
168
+ label="Please enter the candidate labels (separated by 2 consecutive semicolons)...",
169
+ placeholder="Labels here separated by ;;")],
170
  outputs=gr.outputs.Label(num_top_classes=5),
171
  #interpretation="default",
172
  examples=prep_examples())