Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
iface.launch()
|
| 15 |
|
|
@@ -33,3 +34,5 @@ def process():
|
|
| 33 |
subprocess.run(command)# Menjalankan file batch
|
| 34 |
print(command)
|
| 35 |
# subprocess.run([batch_file_path], shell=True)
|
|
|
|
|
|
|
|
|
| 1 |
+
def test():
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
def analyze_text(text):
|
| 5 |
+
# Lakukan analisis atau pemrosesan teks di sini
|
| 6 |
+
result = f"Anda memasukkan teks: {text}"
|
| 7 |
+
return result
|
| 8 |
+
|
| 9 |
+
iface = gr.Interface(
|
| 10 |
+
fn=analyze_text,
|
| 11 |
+
inputs=gr.Textbox(), # Menggunakan input textbox
|
| 12 |
+
outputs="text" # Menetapkan output ke tipe teks
|
| 13 |
+
)
|
| 14 |
|
| 15 |
iface.launch()
|
| 16 |
|
|
|
|
| 34 |
subprocess.run(command)# Menjalankan file batch
|
| 35 |
print(command)
|
| 36 |
# subprocess.run([batch_file_path], shell=True)
|
| 37 |
+
|
| 38 |
+
process()
|