Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|