File size: 339 Bytes
6d92158
c926a01
3060053
 
 
 
 
 
 
 
ea1dd8e
 
6d92158
ea1dd8e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr

from inductor import BartInductor
inductor = BartInductor()
rule = '<mask> is the capital of <mask>.'
generated_texts = inductor.generate(rule)

for text in generated_texts:
    print(text)

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

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