File size: 386 Bytes
6d92158
c926a01
3060053
 
0044d3c
 
 
 
 
 
 
 
 
3060053
ea1dd8e
 
6d92158
ea1dd8e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr

from inductor import BartInductor

try:
    inductor = BartInductor()
    rule = '<mask> is the capital of <mask>.'
    generated_texts = inductor.generate(rule)
    
    for text in generated_texts:
        print(text)
except:
    pass

def uppercase(text):
    return text.upper()

iface = gr.Interface(fn=uppercase, inputs="text", outputs="text")
iface.launch()