Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ class LightSalmonTheme(Soft):
|
|
| 58 |
neutral_hue: colors.Color | str = colors.slate,
|
| 59 |
text_size: sizes.Size | str = sizes.text_lg,
|
| 60 |
font: fonts.Font | str | Iterable[fonts.Font | str] = (
|
| 61 |
-
fonts.GoogleFont("
|
| 62 |
),
|
| 63 |
font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
|
| 64 |
fonts.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace",
|
|
@@ -309,19 +309,20 @@ def generate_video(model_name: str, text: str, video_path: str,
|
|
| 309 |
buffer = buffer.replace("<|im_end|>", "")
|
| 310 |
time.sleep(0.01)
|
| 311 |
yield buffer, buffer
|
| 312 |
-
|
|
|
|
| 313 |
image_examples = [
|
| 314 |
-
["Describe the safety measures in the image. Conclude (Safe / Unsafe)..", "
|
| 315 |
-
["Convert this page to doc [markdown] precisely.", "
|
| 316 |
-
["Convert this page to doc [markdown] precisely.", "
|
| 317 |
-
["Explain the creativity in the image.", "
|
| 318 |
-
["Convert this page to doc [markdown] precisely.", "
|
| 319 |
-
["Convert chart to OTSL.", "
|
| 320 |
]
|
| 321 |
|
| 322 |
video_examples = [
|
| 323 |
-
["Explain the video in detail.", "
|
| 324 |
-
["Explain the ad in detail.", "
|
| 325 |
]
|
| 326 |
|
| 327 |
with gr.Blocks(theme=light_salmon_theme, css=css) as demo:
|
|
|
|
| 58 |
neutral_hue: colors.Color | str = colors.slate,
|
| 59 |
text_size: sizes.Size | str = sizes.text_lg,
|
| 60 |
font: fonts.Font | str | Iterable[fonts.Font | str] = (
|
| 61 |
+
fonts.GoogleFont("Outfit"), "Arial", "sans-serif",
|
| 62 |
),
|
| 63 |
font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
|
| 64 |
fonts.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace",
|
|
|
|
| 309 |
buffer = buffer.replace("<|im_end|>", "")
|
| 310 |
time.sleep(0.01)
|
| 311 |
yield buffer, buffer
|
| 312 |
+
|
| 313 |
+
# Define examples for image and video inference
|
| 314 |
image_examples = [
|
| 315 |
+
["Describe the safety measures in the image. Conclude (Safe / Unsafe)..", "images/5.jpg"],
|
| 316 |
+
["Convert this page to doc [markdown] precisely.", "images/3.png"],
|
| 317 |
+
["Convert this page to doc [markdown] precisely.", "images/4.png"],
|
| 318 |
+
["Explain the creativity in the image.", "images/6.jpg"],
|
| 319 |
+
["Convert this page to doc [markdown] precisely.", "images/1.png"],
|
| 320 |
+
["Convert chart to OTSL.", "images/2.png"]
|
| 321 |
]
|
| 322 |
|
| 323 |
video_examples = [
|
| 324 |
+
["Explain the video in detail.", "videos/2.mp4"],
|
| 325 |
+
["Explain the ad in detail.", "videos/1.mp4"]
|
| 326 |
]
|
| 327 |
|
| 328 |
with gr.Blocks(theme=light_salmon_theme, css=css) as demo:
|