import gradio as gr def convert_to_fahrenheit(celsius): try: celsius = float(celsius) fahrenheit = celsius * 9/5 + 32 return f"{fahrenheit} °F" except ValueError: return "Please enter a valid number." demo = gr.Interface(fn=convert_to_fahrenheit, inputs="text", outputs="text") demo.launch()