question2 / app.py
razanalsulami's picture
Create app.py
0ab110d verified
raw
history blame contribute delete
251 Bytes
import gradio as gr
def celsius_to_fahrenheit(celsius):
fahrenheit = celsius * (9 / 5) + 32
return str(celsius) + "C = " + str(fahrenheit) + "F"
demo = gr.Interface(fn=celsius_to_fahrenheit, inputs="number", outputs="text")
demo.launch()