Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,16 @@
|
|
1 |
from gradio_client import Client
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
)
|
8 |
-
|
|
|
|
1 |
from gradio_client import Client
|
2 |
|
3 |
+
def Prediction():
|
4 |
+
client = Client("Adityadn/Test")
|
5 |
+
result = client.predict(
|
6 |
+
text, # str in 'text' Textbox component
|
7 |
+
api_name="/predict"
|
8 |
+
)
|
9 |
+
|
10 |
+
iface = gr.Interface(
|
11 |
+
fn=Prediction,
|
12 |
+
inputs=gr.Textbox(show_copy_button=True), # Menggunakan input textbox
|
13 |
+
outputs=gr.Textbox(type="text",show_copy_button=True) # Menetapkan output ke tipe teks
|
14 |
)
|
15 |
+
|
16 |
+
iface.launch(show_api=False)
|