File size: 573 Bytes
d2b9628 d63c6cd 994c3d0 d63c6cd 8347990 994c3d0 8347990 9e0460a 8347990 d2bf1cc 9341c21 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import gradio as gr
def calculator(num1, operation, num2):
if operation == "add":
return num1 + num2
elif operation == "subtract":
return num1 - num2
elif operation == "multiply":
return num1 * num2
elif operation == "divide":
return num1 / num2
def sampler(body, bottomwear, hair, topwear):
img_name = str(body) + str(bottomwear) + str(hair) + str(topwear)
return img_name
demo = gr.Interface(
sampler,
[gr.Radio(["body", "bottomwear", "hair", "topwear"])],
img_name,
live=True,
)
demo.launch()
|