andreslu commited on
Commit
0044d3c
·
1 Parent(s): feac146

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -1,12 +1,16 @@
1
  import gradio as gr
2
 
3
  from inductor import BartInductor
4
- inductor = BartInductor()
5
- rule = '<mask> is the capital of <mask>.'
6
- generated_texts = inductor.generate(rule)
7
 
8
- for text in generated_texts:
9
- print(text)
 
 
 
 
 
 
 
10
 
11
  def uppercase(text):
12
  return text.upper()
 
1
  import gradio as gr
2
 
3
  from inductor import BartInductor
 
 
 
4
 
5
+ try:
6
+ inductor = BartInductor()
7
+ rule = '<mask> is the capital of <mask>.'
8
+ generated_texts = inductor.generate(rule)
9
+
10
+ for text in generated_texts:
11
+ print(text)
12
+ except:
13
+ pass
14
 
15
  def uppercase(text):
16
  return text.upper()