Ozgur Unlu
commited on
Commit
·
93ea004
1
Parent(s):
bd86724
interface changes
Browse files- interface.py +6 -22
interface.py
CHANGED
@@ -32,19 +32,6 @@ def create_interface():
|
|
32 |
background-color: #f8f9fa;
|
33 |
border-radius: 5px;
|
34 |
}
|
35 |
-
.container {
|
36 |
-
display: flex;
|
37 |
-
gap: 20px;
|
38 |
-
min-height: 400px;
|
39 |
-
}
|
40 |
-
.input-column {
|
41 |
-
flex: 1;
|
42 |
-
min-width: 400px;
|
43 |
-
}
|
44 |
-
.output-column {
|
45 |
-
flex: 1;
|
46 |
-
min-width: 400px;
|
47 |
-
}
|
48 |
"""
|
49 |
|
50 |
# Create a placeholder HTML
|
@@ -77,15 +64,12 @@ def create_interface():
|
|
77 |
return None, True, True, True, placeholder_html
|
78 |
|
79 |
with gr.Blocks(theme=gr.themes.Default(), css=css) as demo:
|
80 |
-
gr.Markdown("# Marketing Campaign
|
81 |
gr.Markdown("Upload marketing material to check compliance with financial regulations.")
|
82 |
|
83 |
-
|
84 |
-
output = gr.HTML(value=placeholder_html, label="Compliance Report")
|
85 |
-
|
86 |
-
with gr.Row() as container:
|
87 |
# Left column - Image input
|
88 |
-
with gr.Column(
|
89 |
image_input = gr.Image(
|
90 |
type="numpy",
|
91 |
label="Upload Marketing Material",
|
@@ -99,12 +83,12 @@ def create_interface():
|
|
99 |
eu = gr.Checkbox(value=True, label="EU", interactive=True)
|
100 |
|
101 |
with gr.Row():
|
102 |
-
clear_btn = gr.ClearButton([image_input, us_sec, uk_fca, eu
|
103 |
submit_btn = gr.Button("Submit")
|
104 |
|
105 |
# Right column - Compliance report
|
106 |
-
with gr.Column(
|
107 |
-
gr.HTML(value=
|
108 |
|
109 |
# Set up the submit action
|
110 |
submit_btn.click(
|
|
|
32 |
background-color: #f8f9fa;
|
33 |
border-radius: 5px;
|
34 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
"""
|
36 |
|
37 |
# Create a placeholder HTML
|
|
|
64 |
return None, True, True, True, placeholder_html
|
65 |
|
66 |
with gr.Blocks(theme=gr.themes.Default(), css=css) as demo:
|
67 |
+
gr.Markdown("# Marketing Campaign Compliance Checker")
|
68 |
gr.Markdown("Upload marketing material to check compliance with financial regulations.")
|
69 |
|
70 |
+
with gr.Row():
|
|
|
|
|
|
|
71 |
# Left column - Image input
|
72 |
+
with gr.Column():
|
73 |
image_input = gr.Image(
|
74 |
type="numpy",
|
75 |
label="Upload Marketing Material",
|
|
|
83 |
eu = gr.Checkbox(value=True, label="EU", interactive=True)
|
84 |
|
85 |
with gr.Row():
|
86 |
+
clear_btn = gr.ClearButton([image_input, us_sec, uk_fca, eu])
|
87 |
submit_btn = gr.Button("Submit")
|
88 |
|
89 |
# Right column - Compliance report
|
90 |
+
with gr.Column():
|
91 |
+
output = gr.HTML(value=placeholder_html, label="Compliance Report")
|
92 |
|
93 |
# Set up the submit action
|
94 |
submit_btn.click(
|