spagestic commited on
Commit
fcfbd59
·
1 Parent(s): c735b62

feat: update examples in Gradio interfaces for vector operations to improve clarity

Browse files
maths/vectors/vector_add.py CHANGED
@@ -24,6 +24,5 @@ vector_add_interface = gr.Interface(
24
  outputs=gr.Textbox(label="Resulting Vector"),
25
  title="Vector Addition",
26
  description="Adds two vectors of the same dimension.\n\nExample:\nInput: [1,2,3] and [4,5,6]\nOutput: [5.0, 7.0, 9.0]",
27
- examples=[(["[1,2,3]", "[4,5,6]"], "[5.0, 7.0, 9.0]"),
28
- (["1,2,3", "4,5,6"], "[5.0, 7.0, 9.0]")],
29
  )
 
24
  outputs=gr.Textbox(label="Resulting Vector"),
25
  title="Vector Addition",
26
  description="Adds two vectors of the same dimension.\n\nExample:\nInput: [1,2,3] and [4,5,6]\nOutput: [5.0, 7.0, 9.0]",
27
+ examples=[["[1,2,3]", "[4,5,6]"], ["1,2,3", "4,5,6"]],
 
28
  )
maths/vectors/vector_cross_product.py CHANGED
@@ -25,6 +25,5 @@ vector_cross_product_interface = gr.Interface(
25
  outputs=gr.Textbox(label="Resulting Vector (3D)"),
26
  title="Vector Cross Product",
27
  description="Calculates the cross product of two 3D vectors.\n\nExample:\nInput: [1,2,3] and [4,5,6]\nOutput: [-3.0, 6.0, -3.0]",
28
- examples=[(["[1,2,3]", "[4,5,6]"], "[-3.0, 6.0, -3.0]"),
29
- (["1,2,3", "4,5,6"], "[-3.0, 6.0, -3.0]")],
30
  )
 
25
  outputs=gr.Textbox(label="Resulting Vector (3D)"),
26
  title="Vector Cross Product",
27
  description="Calculates the cross product of two 3D vectors.\n\nExample:\nInput: [1,2,3] and [4,5,6]\nOutput: [-3.0, 6.0, -3.0]",
28
+ examples=[["[1,2,3]", "[4,5,6]"], ["1,2,3", "4,5,6"]],
 
29
  )
maths/vectors/vector_dot_product.py CHANGED
@@ -25,6 +25,5 @@ vector_dot_product_interface = gr.Interface(
25
  outputs=gr.Textbox(label="Dot Product (Scalar)"),
26
  title="Vector Dot Product",
27
  description="Calculates the dot product of two vectors of the same dimension.\n\nExample:\nInput: [1,2,3] and [4,5,6]\nOutput: 32.0",
28
- examples=[(["[1,2,3]", "[4,5,6]"], "32.0"),
29
- (["1,2,3", "4,5,6"], "32.0")],
30
  )
 
25
  outputs=gr.Textbox(label="Dot Product (Scalar)"),
26
  title="Vector Dot Product",
27
  description="Calculates the dot product of two vectors of the same dimension.\n\nExample:\nInput: [1,2,3] and [4,5,6]\nOutput: 32.0",
28
+ examples=[["[1,2,3]", "[4,5,6]"], ["1,2,3", "4,5,6"]],
 
29
  )
maths/vectors/vector_subtract.py CHANGED
@@ -25,6 +25,5 @@ vector_subtract_interface = gr.Interface(
25
  outputs=gr.Textbox(label="Resulting Vector"),
26
  title="Vector Subtraction",
27
  description="Subtracts the second vector from the first. Both must have the same dimension.\n\nExample:\nInput: [4,5,6] and [1,2,3]\nOutput: [3.0, 3.0, 3.0]",
28
- examples=[(["[4,5,6]", "[1,2,3]"], "[3.0, 3.0, 3.0]"),
29
- (["4,5,6", "1,2,3"], "[3.0, 3.0, 3.0]")],
30
  )
 
25
  outputs=gr.Textbox(label="Resulting Vector"),
26
  title="Vector Subtraction",
27
  description="Subtracts the second vector from the first. Both must have the same dimension.\n\nExample:\nInput: [4,5,6] and [1,2,3]\nOutput: [3.0, 3.0, 3.0]",
28
+ examples=[["[4,5,6]", "[1,2,3]"], ["4,5,6", "1,2,3"]],
 
29
  )