File size: 575 Bytes
bed51c0
 
 
 
 
 
 
 
 
 
 
 
 
 
aa87735
bed51c0
 
ef55b50
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
import matplotlib.pyplot as plt
import numpy as np

def plot_graph(x_values, y_values, optional1='', optional2='', optional3='', optional4='', optional5='', optional6='', optional7='', optional8='', optional9='', optional10=''):
    plt.plot(x_values, y_values)
    plt.title('Graph')
    plt.xlabel('X-axis')
    plt.ylabel('Y-axis')
    plt.show()

inputs = [
    gr.Textbox(label="X Values"),
    gr.Textbox(label="Y Values"),
    gr.Group([gr.Textbox(label=f"Optional {i+1}") for i in range(10)])
]

gr.Interface(plot_graph, inputs, "image").launch()