import gradio as gr from inductor import BartInductor inductor = BartInductor() rule = ' is the capital of .' 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()