andreslu commited on
Commit
59c5207
Β·
1 Parent(s): 764b507

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
- #from inductor import BartInductor
3
 
4
- #inductor = BartInductor()
5
 
6
  def bart(text):
7
  #results = inductor.generate(text)
@@ -10,11 +10,21 @@ def bart(text):
10
  results_dict = {result[0]: float(result[1]) for result in results}
11
  return results_dict
12
 
13
- iface = gr.Interface(fn=bart,
14
  inputs=gr.inputs.Textbox(default='<mask> is the capital of <mask>.'),
15
  outputs=gr.Label(),
16
  title="BART Inductor",
17
  examples=[['<mask> is the capital of <mask>.']],
18
  description="Enter a text prompt to generate text using BART.")
19
 
20
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ from inductor import BartInductor
3
 
4
+ inductor = BartInductor()
5
 
6
  def bart(text):
7
  #results = inductor.generate(text)
 
10
  results_dict = {result[0]: float(result[1]) for result in results}
11
  return results_dict
12
 
13
+ bivar = gr.Interface(fn=bart,
14
  inputs=gr.inputs.Textbox(default='<mask> is the capital of <mask>.'),
15
  outputs=gr.Label(),
16
  title="BART Inductor",
17
  examples=[['<mask> is the capital of <mask>.']],
18
  description="Enter a text prompt to generate text using BART.")
19
 
20
+ trivar = gr.Interface(fn=bart,
21
+ inputs=gr.inputs.Textbox(default='<mask> is the capital of <mask>.'),
22
+ outputs=gr.Label(),
23
+ title="BART Inductor",
24
+ examples=[['<mask> is the capital of <mask>.']],
25
+ description="Enter a text prompt to generate text using BART.")
26
+
27
+ demo = gr.TabbedInterface([bivar, stt_demo], ["εŒε˜ι‡", "δΈ‰ε˜ι‡"])
28
+
29
+ if __name__ == "__main__":
30
+ demo.launch()