import gradio as gr # Load the model model = gr.Interface.load("models/roneneldan/TinyStories-Instruct-33M") # HTML template with JavaScript to update the text dynamically html_code = """ Tiny Stories Generator
""" # Launch the interface using the custom HTML code gr.Interface(fn=lambda inputs: inputs, inputs=gr.inputs.Textbox(), outputs=gr.outputs.HTML(html_code)).launch()