Spaces:
Running
Running
Synced repo using 'sync_with_huggingface' Github Action
Browse files- app.py +6 -0
- demos/compare.py +3 -2
- demos/generate.py +2 -1
app.py
CHANGED
|
@@ -9,6 +9,12 @@ custom_css = """
|
|
| 9 |
height: 240px; /* Fixed height */
|
| 10 |
object-fit: contain; /* Scale the image to fit within the element */
|
| 11 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
#chunked-text span.label {
|
| 13 |
text-transform: none !important;
|
| 14 |
}
|
|
|
|
| 9 |
height: 240px; /* Fixed height */
|
| 10 |
object-fit: contain; /* Scale the image to fit within the element */
|
| 11 |
}
|
| 12 |
+
|
| 13 |
+
.fixed-height img {
|
| 14 |
+
height: 240px; /* Fixed height */
|
| 15 |
+
object-fit: contain; /* Scale the image to fit within the element */
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
#chunked-text span.label {
|
| 19 |
text-transform: none !important;
|
| 20 |
}
|
demos/compare.py
CHANGED
|
@@ -135,7 +135,8 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 135 |
elem_id="examples-a",
|
| 136 |
)
|
| 137 |
|
| 138 |
-
out_iscc_a = gr.Text(label="ISCC")
|
|
|
|
| 139 |
with gr.Accordion(label="ISCC Metadata", open=False):
|
| 140 |
out_meta_a = gr.Code(language="json", label="JSON-LD")
|
| 141 |
|
|
@@ -164,7 +165,7 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 164 |
elem_id="examples-b",
|
| 165 |
)
|
| 166 |
|
| 167 |
-
out_iscc_b = gr.Text(label="ISCC")
|
| 168 |
with gr.Accordion(label="ISCC Metadata", open=False):
|
| 169 |
out_meta_b = gr.Code(language="json", label="JSON-LD")
|
| 170 |
|
|
|
|
| 135 |
elem_id="examples-a",
|
| 136 |
)
|
| 137 |
|
| 138 |
+
out_iscc_a = gr.Text(label="ISCC", show_copy_button=True)
|
| 139 |
+
|
| 140 |
with gr.Accordion(label="ISCC Metadata", open=False):
|
| 141 |
out_meta_a = gr.Code(language="json", label="JSON-LD")
|
| 142 |
|
|
|
|
| 165 |
elem_id="examples-b",
|
| 166 |
)
|
| 167 |
|
| 168 |
+
out_iscc_b = gr.Text(label="ISCC", show_copy_button=True)
|
| 169 |
with gr.Accordion(label="ISCC Metadata", open=False):
|
| 170 |
out_meta_b = gr.Code(language="json", label="JSON-LD")
|
| 171 |
|
demos/generate.py
CHANGED
|
@@ -43,7 +43,7 @@ def generate_iscc(file):
|
|
| 43 |
with gr.Blocks(title="ISCC Generator", css=custom_css) as demo:
|
| 44 |
gr.Markdown("## ⚙️ ISCC Generator")
|
| 45 |
with gr.Row():
|
| 46 |
-
in_file = gr.File(label="Media File")
|
| 47 |
with gr.Row():
|
| 48 |
out_iscc = gr.Text(
|
| 49 |
label="ISCC",
|
|
@@ -57,6 +57,7 @@ with gr.Blocks(title="ISCC Generator", css=custom_css) as demo:
|
|
| 57 |
label="Extracted Thumbnail",
|
| 58 |
elem_classes=["fixed-height"],
|
| 59 |
height=240,
|
|
|
|
| 60 |
)
|
| 61 |
with gr.Column(scale=3):
|
| 62 |
with gr.Group():
|
|
|
|
| 43 |
with gr.Blocks(title="ISCC Generator", css=custom_css) as demo:
|
| 44 |
gr.Markdown("## ⚙️ ISCC Generator")
|
| 45 |
with gr.Row():
|
| 46 |
+
in_file = gr.File(label="Media File", elem_classes=["fixed-height"])
|
| 47 |
with gr.Row():
|
| 48 |
out_iscc = gr.Text(
|
| 49 |
label="ISCC",
|
|
|
|
| 57 |
label="Extracted Thumbnail",
|
| 58 |
elem_classes=["fixed-height"],
|
| 59 |
height=240,
|
| 60 |
+
show_download_button=False,
|
| 61 |
)
|
| 62 |
with gr.Column(scale=3):
|
| 63 |
with gr.Group():
|