Aditya DN commited on
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
print("Wait..")
|
| 2 |
+
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
def analyze_text(text):
|
| 6 |
+
# Lakukan analisis atau pemrosesan teks di sini
|
| 7 |
+
result = f"Anda memasukkan teks: {text}"
|
| 8 |
+
return result
|
| 9 |
+
|
| 10 |
+
iface = gr.Interface(
|
| 11 |
+
fn=analyze_text,
|
| 12 |
+
inputs=gr.Textbox(), # Menggunakan input textbox
|
| 13 |
+
outputs="text" # Menetapkan output ke tipe teks
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
iface.launch()
|