Spaces:
Runtime error
Runtime error
Commit
•
82f16bf
1
Parent(s):
ebbf054
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import os
|
|
6 |
from screenshot import BG_COMP, BOX_COMP, GENERATION_VAR, PROMPT_VAR, main
|
7 |
from pathlib import Path
|
8 |
|
9 |
-
title = "BLOOM"
|
10 |
|
11 |
description = """Gradio Demo for BLOOM. To use it, simply add your text, or click one of the examples to load them.
|
12 |
Tips:
|
@@ -20,7 +20,9 @@ Options:
|
|
20 |
|
21 |
wip_description = """JAX / Flax Gradio Demo for BLOOM. The 176B BLOOM model running on a TPU v3-256 pod, with 2D model parallelism and custom mesh axes.
|
22 |
|
23 |
-
Note:
|
|
|
|
|
24 |
"""
|
25 |
|
26 |
API_URL = os.getenv("API_URL")
|
@@ -100,7 +102,7 @@ def inference(input_sentence, max_length, sample_or_greedy, raw_text=True):
|
|
100 |
colors=colors,
|
101 |
frame_to_box_margin=200,
|
102 |
text_to_text_box_margin=50,
|
103 |
-
init_font_size=
|
104 |
right_align=False,
|
105 |
)
|
106 |
return img, data[0]['generated_text']
|
|
|
6 |
from screenshot import BG_COMP, BOX_COMP, GENERATION_VAR, PROMPT_VAR, main
|
7 |
from pathlib import Path
|
8 |
|
9 |
+
title = "JAX / Flax BLOOM 🌸"
|
10 |
|
11 |
description = """Gradio Demo for BLOOM. To use it, simply add your text, or click one of the examples to load them.
|
12 |
Tips:
|
|
|
20 |
|
21 |
wip_description = """JAX / Flax Gradio Demo for BLOOM. The 176B BLOOM model running on a TPU v3-256 pod, with 2D model parallelism and custom mesh axes.
|
22 |
|
23 |
+
Note:
|
24 |
+
1. For this WIP demo, only **sampling** is supported.
|
25 |
+
2. Rendering of the screenshot is currently not optimised. To experience the true speed of JAX / Flax, tick 'just output raw text'.
|
26 |
"""
|
27 |
|
28 |
API_URL = os.getenv("API_URL")
|
|
|
102 |
colors=colors,
|
103 |
frame_to_box_margin=200,
|
104 |
text_to_text_box_margin=50,
|
105 |
+
init_font_size=142,
|
106 |
right_align=False,
|
107 |
)
|
108 |
return img, data[0]['generated_text']
|