Spaces:
Sleeping
Sleeping
rdsarjito
commited on
Commit
·
4e05d75
1
Parent(s):
c4aea7e
[FIX]UI
Browse files
app.py
CHANGED
|
@@ -591,8 +591,7 @@ with gr.Blocks(theme=gr.themes.Default(), css=custom_css, title="Gambling Websit
|
|
| 591 |
url_input = gr.Textbox(
|
| 592 |
label="URL Website",
|
| 593 |
placeholder="https://example.com",
|
| 594 |
-
lines=1
|
| 595 |
-
container=False
|
| 596 |
)
|
| 597 |
predict_button = gr.Button(
|
| 598 |
"Analisis Website",
|
|
@@ -615,26 +614,22 @@ with gr.Blocks(theme=gr.themes.Default(), css=custom_css, title="Gambling Websit
|
|
| 615 |
label_output = gr.Label(
|
| 616 |
label="Hasil Prediksi",
|
| 617 |
value={"Gambling": 0.0, "Non-Gambling": 0.0},
|
| 618 |
-
num_top_classes=2
|
| 619 |
-
container=False
|
| 620 |
)
|
| 621 |
confidence_output = gr.Markdown(
|
| 622 |
value="",
|
| 623 |
-
label="Tingkat Keyakinan"
|
| 624 |
-
container=False
|
| 625 |
)
|
| 626 |
model_info_output = gr.Markdown(
|
| 627 |
value="",
|
| 628 |
-
label="Informasi Model"
|
| 629 |
-
container=False
|
| 630 |
)
|
| 631 |
|
| 632 |
with gr.Column(scale=1):
|
| 633 |
screenshot_output = gr.Image(
|
| 634 |
label="Screenshot Website",
|
| 635 |
type="filepath",
|
| 636 |
-
height=400
|
| 637 |
-
container=False
|
| 638 |
)
|
| 639 |
|
| 640 |
with gr.Row():
|
|
@@ -646,16 +641,14 @@ with gr.Blocks(theme=gr.themes.Default(), css=custom_css, title="Gambling Websit
|
|
| 646 |
label="Teks Mentah (Raw OCR)",
|
| 647 |
lines=6,
|
| 648 |
interactive=False,
|
| 649 |
-
placeholder="Teks yang diekstrak dari screenshot akan muncul di sini..."
|
| 650 |
-
container=False
|
| 651 |
)
|
| 652 |
with gr.Column():
|
| 653 |
cleaned_text_output = gr.Textbox(
|
| 654 |
label="Teks yang Diproses",
|
| 655 |
lines=6,
|
| 656 |
interactive=False,
|
| 657 |
-
placeholder="Teks yang sudah dibersihkan akan muncul di sini..."
|
| 658 |
-
container=False
|
| 659 |
)
|
| 660 |
|
| 661 |
predict_button.click(
|
|
@@ -687,10 +680,9 @@ with gr.Blocks(theme=gr.themes.Default(), css=custom_css, title="Gambling Websit
|
|
| 687 |
with gr.Column():
|
| 688 |
file_input = gr.File(
|
| 689 |
label="Upload File URL (.txt)",
|
| 690 |
-
file_types=[".txt"]
|
| 691 |
-
container=False
|
| 692 |
)
|
| 693 |
-
gr.Markdown("**Format file:** Satu URL per baris"
|
| 694 |
batch_predict_button = gr.Button(
|
| 695 |
"Proses Batch",
|
| 696 |
variant="primary",
|
|
@@ -702,8 +694,7 @@ with gr.Blocks(theme=gr.themes.Default(), css=custom_css, title="Gambling Websit
|
|
| 702 |
batch_output = gr.DataFrame(
|
| 703 |
label="Hasil Analisis",
|
| 704 |
wrap=True,
|
| 705 |
-
interactive=False
|
| 706 |
-
container=False
|
| 707 |
)
|
| 708 |
|
| 709 |
batch_predict_button.click(
|
|
|
|
| 591 |
url_input = gr.Textbox(
|
| 592 |
label="URL Website",
|
| 593 |
placeholder="https://example.com",
|
| 594 |
+
lines=1
|
|
|
|
| 595 |
)
|
| 596 |
predict_button = gr.Button(
|
| 597 |
"Analisis Website",
|
|
|
|
| 614 |
label_output = gr.Label(
|
| 615 |
label="Hasil Prediksi",
|
| 616 |
value={"Gambling": 0.0, "Non-Gambling": 0.0},
|
| 617 |
+
num_top_classes=2
|
|
|
|
| 618 |
)
|
| 619 |
confidence_output = gr.Markdown(
|
| 620 |
value="",
|
| 621 |
+
label="Tingkat Keyakinan"
|
|
|
|
| 622 |
)
|
| 623 |
model_info_output = gr.Markdown(
|
| 624 |
value="",
|
| 625 |
+
label="Informasi Model"
|
|
|
|
| 626 |
)
|
| 627 |
|
| 628 |
with gr.Column(scale=1):
|
| 629 |
screenshot_output = gr.Image(
|
| 630 |
label="Screenshot Website",
|
| 631 |
type="filepath",
|
| 632 |
+
height=400
|
|
|
|
| 633 |
)
|
| 634 |
|
| 635 |
with gr.Row():
|
|
|
|
| 641 |
label="Teks Mentah (Raw OCR)",
|
| 642 |
lines=6,
|
| 643 |
interactive=False,
|
| 644 |
+
placeholder="Teks yang diekstrak dari screenshot akan muncul di sini..."
|
|
|
|
| 645 |
)
|
| 646 |
with gr.Column():
|
| 647 |
cleaned_text_output = gr.Textbox(
|
| 648 |
label="Teks yang Diproses",
|
| 649 |
lines=6,
|
| 650 |
interactive=False,
|
| 651 |
+
placeholder="Teks yang sudah dibersihkan akan muncul di sini..."
|
|
|
|
| 652 |
)
|
| 653 |
|
| 654 |
predict_button.click(
|
|
|
|
| 680 |
with gr.Column():
|
| 681 |
file_input = gr.File(
|
| 682 |
label="Upload File URL (.txt)",
|
| 683 |
+
file_types=[".txt"]
|
|
|
|
| 684 |
)
|
| 685 |
+
gr.Markdown("**Format file:** Satu URL per baris")
|
| 686 |
batch_predict_button = gr.Button(
|
| 687 |
"Proses Batch",
|
| 688 |
variant="primary",
|
|
|
|
| 694 |
batch_output = gr.DataFrame(
|
| 695 |
label="Hasil Analisis",
|
| 696 |
wrap=True,
|
| 697 |
+
interactive=False
|
|
|
|
| 698 |
)
|
| 699 |
|
| 700 |
batch_predict_button.click(
|