mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-18 10:44:33 +08:00
updated imports to components.py
This commit is contained in:
parent
f2f4d0d022
commit
e9386f5838
@ -14,7 +14,7 @@ def calculator(num1, operation, num2):
|
||||
|
||||
iface = gr.Interface(
|
||||
calculator,
|
||||
["number", gr.inputs.Radio(["add", "subtract", "multiply", "divide"]), "number"],
|
||||
["number", gr.Radio(["add", "subtract", "multiply", "divide"]), "number"],
|
||||
"number",
|
||||
examples=[
|
||||
[5, "add", 3],
|
||||
|
@ -14,12 +14,12 @@ def diff_texts(text1, text2):
|
||||
iface = gr.Interface(
|
||||
diff_texts,
|
||||
[
|
||||
gr.inputs.Textbox(
|
||||
gr.Textbox(
|
||||
lines=3, default="The quick brown fox jumped over the lazy dogs."
|
||||
),
|
||||
gr.inputs.Textbox(lines=3, default="The fast brown fox jumps over lazy dogs."),
|
||||
gr.Textbox(lines=3, default="The fast brown fox jumps over lazy dogs."),
|
||||
],
|
||||
gr.outputs.HighlightedText(color_map={"+": "green", "-": "pink"}),
|
||||
gr.HighlightedText(color_map={"+": "green", "-": "pink"}),
|
||||
)
|
||||
if __name__ == "__main__":
|
||||
iface.launch()
|
||||
|
Loading…
Reference in New Issue
Block a user