import gradio as gr # Load model directly # Use a pipeline as a high-level helper from transformers import pipeline def greet(name): generator = pipeline("text-generation", model="surya-narayanan/high_school_mathematics-gpt2") res= generator("what is similar traingles") print(res) demo = gr.Interface(fn=greet, inputs="text", outputs="text") demo.launch(share=True)