asahi417 commited on
Commit
e2905f0
1 Parent(s): f58d9a0
Files changed (1) hide show
  1. app.py +3 -13
app.py CHANGED
@@ -28,11 +28,7 @@ def greet(
28
  candidate_3,
29
  candidate_4,
30
  candidate_5,
31
- candidate_6,
32
- candidate_7,
33
- candidate_8,
34
- candidate_9,
35
- candidate_10):
36
  query = query.split(',')
37
  # validate query
38
  if len(query) == 0:
@@ -50,11 +46,7 @@ def greet(
50
  candidate_3,
51
  candidate_4,
52
  candidate_5,
53
- candidate_6,
54
- candidate_7,
55
- candidate_8,
56
- candidate_9,
57
- candidate_10
58
  ]):
59
  if i == '':
60
  continue
@@ -78,7 +70,7 @@ def greet(
78
 
79
 
80
  examples = get_example()[:15]
81
- examples = [[','.join(i['stem'])] + [','.join(c) for c in i['choice'] + [''] * (10 - len(i['choice']))] for i in examples]
82
  demo = gr.Interface(
83
  fn=greet,
84
  inputs=[
@@ -98,5 +90,3 @@ demo = gr.Interface(
98
  examples=examples
99
  )
100
  demo.launch(show_error=True)
101
-
102
-
 
28
  candidate_3,
29
  candidate_4,
30
  candidate_5,
31
+ candidate_6):
 
 
 
 
32
  query = query.split(',')
33
  # validate query
34
  if len(query) == 0:
 
46
  candidate_3,
47
  candidate_4,
48
  candidate_5,
49
+ candidate_6
 
 
 
 
50
  ]):
51
  if i == '':
52
  continue
 
70
 
71
 
72
  examples = get_example()[:15]
73
+ examples = [[','.join(i['stem'])] + [','.join(c) for c in i['choice'] + [''] * (6 - len(i['choice']))] for i in examples]
74
  demo = gr.Interface(
75
  fn=greet,
76
  inputs=[
 
90
  examples=examples
91
  )
92
  demo.launch(show_error=True)