Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import random | |
| def generate_text(length): | |
| text = "" | |
| for i in range(length): | |
| text += chr(random.randint(97, 122)) | |
| return text | |
| input_text = gr.inputs.Slider(minimum=1, maximum=100, default=50, label="Length of Text") | |
| output_text = gr.outputs.Textbox(label="Generated Text") | |
| title = "Random Text Generator" | |
| description = "Generate random text of a specified length." | |
| gr.Interface(fn=generate_text, inputs=input_text, outputs=output_text, title=title, description=description).launch() | |