File size: 724 Bytes
d2b9628
d63c6cd
994c3d0
 
 
 
 
 
 
 
 
d63c6cd
8347990
 
 
 
 
994c3d0
 
 
 
 
 
d63c6cd
994c3d0
8347990
 
 
 
 
 
d2bf1cc
 
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
27
28
29
30
31
32
33
34
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(
    calculator,
    ["number", gr.Radio(["add", "subtract", "multiply", "divide"]), "number"],
    "number",
    live=True,
)

demo.launch()

demo2 = gr.Interface(
    sampler,
    [gr.Radio(["body", "bottomwear", "hair", "topwear"])],
    live=True,
)

demo2.launch()