File size: 517 Bytes
aa8a037
1a71b30
 
aa8a037
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr
import sklearn 

# Step 1: Define input components

input_component = gr.Textbox(label = "Input Text")


# Step 2: Define output components 


output_components = gr.Textbox(label = "Output Text")



# Step 3: Define a backend function to process input and get output

def process_inputs(input):
  # do whatever you do 

  final_output = input + ' received'

  return final_output

demo = gr.Interface(fn=process_inputs, inputs=input_component, outputs=output_components)
demo.launch(debug=True)