File size: 555 Bytes
97a9af7
2f1b79c
 
bae31ed
5736297
 
bae31ed
 
5736297
bae31ed
5736297
 
 
bae31ed
0cfacf6
2f1b79c
5736297
9687d34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from gradio_client import Client

def Prediction(text):
    client = Client("Adityadn/Test")
    result = client.predict(
        text,    # Menggunakan teks yang dimasukkan pengguna
        api_name="/predict"
    )
    return result

iface = gr.Interface(
    fn=Prediction,
    inputs=gr.Textbox(label="Input", placeholder="Enter Text Here", show_copy_button=True),  # Menggunakan input textbox dengan label dan tombol salin
    outputs=gr.Textbox(type="text", label="Output", show_copy_button=True)
)

iface.launch(show_api=False)