Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,13 @@ def classify_commit(message):
|
|
18 |
# Return the predicted labels as a comma-separated string
|
19 |
return ", ".join(predicted_labels[0]) if predicted_labels[0] else "No labels"
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
# Create a Gradio interface with Dockerfile-specific examples and visuals
|
22 |
demo = gr.Interface(
|
23 |
fn=classify_commit,
|
@@ -37,7 +44,6 @@ demo = gr.Interface(
|
|
37 |
["Sort Dockerfile"],
|
38 |
["Added COPY instruction for configuration files"],
|
39 |
],
|
40 |
-
theme="compact", # Optional: A compact Gradio theme
|
41 |
article="""
|
42 |
**How to Use**:
|
43 |
- Enter a commit message related to Dockerfiles.
|
@@ -48,6 +54,7 @@ demo = gr.Interface(
|
|
48 |
- Adding new Docker build stages.
|
49 |
- Updating dependencies in Dockerfiles.
|
50 |
""",
|
|
|
51 |
)
|
52 |
|
53 |
# Launch the Gradio app
|
|
|
18 |
# Return the predicted labels as a comma-separated string
|
19 |
return ", ".join(predicted_labels[0]) if predicted_labels[0] else "No labels"
|
20 |
|
21 |
+
# Custom CSS for Light Blue Background
|
22 |
+
custom_css = """
|
23 |
+
body {
|
24 |
+
background-color: #d0f0fd; /* Light Blue */
|
25 |
+
}
|
26 |
+
"""
|
27 |
+
|
28 |
# Create a Gradio interface with Dockerfile-specific examples and visuals
|
29 |
demo = gr.Interface(
|
30 |
fn=classify_commit,
|
|
|
44 |
["Sort Dockerfile"],
|
45 |
["Added COPY instruction for configuration files"],
|
46 |
],
|
|
|
47 |
article="""
|
48 |
**How to Use**:
|
49 |
- Enter a commit message related to Dockerfiles.
|
|
|
54 |
- Adding new Docker build stages.
|
55 |
- Updating dependencies in Dockerfiles.
|
56 |
""",
|
57 |
+
css=custom_css,
|
58 |
)
|
59 |
|
60 |
# Launch the Gradio app
|