updated imports to components.py

This commit is contained in:
Abubakar Abid 2022-03-21 13:29:23 -07:00
parent f2f4d0d022
commit e9386f5838
2 changed files with 4 additions and 4 deletions

View File

@ -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],

View File

@ -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()