File size: 456 Bytes
97a9af7
2f1b79c
 
5736297
 
 
 
 
 
 
 
 
 
 
2f1b79c
5736297
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
from gradio_client import Client

def Prediction():
    client = Client("Adityadn/Test")
    result = client.predict(
    		text,	# str in 'text' Textbox component
    		api_name="/predict"
    )

iface = gr.Interface(
    fn=Prediction,
    inputs=gr.Textbox(show_copy_button=True),  # Menggunakan input textbox
    outputs=gr.Textbox(type="text",show_copy_button=True)  # Menetapkan output ke tipe teks
)

iface.launch(show_api=False)