Spaces:
Build error
Build error
File size: 3,257 Bytes
8cb5d67 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
description = """Gradio Demo for BLOOM. To use it, simply add your text, or click one of the examples to load them.
Tips:
- Do NOT talk to BLOOM as an entity, it's not a chatbot but a webpage/blog/article completion model.
- For the best results: MIMIC a few sentences of a webpage similar to the content you want to generate.
Start a paragraph as if YOU were writing a blog, webpage, math post, coding article and BLOOM will generate a coherent follow-up. Longer prompts usually give more interesting results.
- Content: Please see our [content disclaimer](https://hf.co/spaces/bigscience/bloom-book) before using the model, as it may sometimes behave in unexpected ways.
Options:
- sampling: imaginative completions (may be not super accurate e.g. math/history)
- greedy: accurate completions (may be more boring or have repetitions)
"""
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.
Note:
1. For this WIP demo, only **sampling** is supported.
2. Rendering of the screenshot is currently not optimised. To experience the true speed of JAX / Flax, tick 'just output raw text'.
"""
examples = [
[
'A "whatpu" is a small, furry animal native to Tanzania. An example of a sentence that uses the word whatpu is: We were traveling in Africa and we saw these very cute whatpus. To do a "farduddle" means to jump up and down really fast. An example of a sentence that uses the word farduddle is:',
32,
"Sample",
"Sample 1",
],
[
"A poem about the beauty of science by Alfred Edgar Brittle\nTitle: The Magic Craft\nIn the old times",
50,
"Sample",
"Sample 1",
],
["استخراج العدد العاملي في لغة بايثون:", 30, "Greedy", "Sample 1"],
["Pour déguster un ortolan, il faut tout d'abord", 32, "Sample", "Sample 1"],
[
"Traduce español de España a español de Argentina\nEl coche es rojo - el auto es rojo\nEl ordenador es nuevo - la computadora es nueva\nel boligrafo es negro -",
16,
"Sample",
"Sample 1",
],
[
"Estos ejemplos quitan vocales de las palabras\nEjemplos:\nhola - hl\nmanzana - mnzn\npapas - pps\nalacran - lcrn\npapa -",
16,
"Sample",
"Sample 1",
],
[
"Question: If I put cheese into the fridge, will it melt?\nAnswer:",
32,
"Sample",
"Sample 1",
],
["Math exercise - answers:\n34+10=44\n54+20=", 16, "Greedy", "Sample 1"],
[
"Question: Where does the Greek Goddess Persephone spend half of the year when she is not with her mother?\nAnswer:",
24,
"Greedy",
"Sample 1",
],
[
"spelling test answers.\nWhat are the letters in « language »?\nAnswer: l-a-n-g-u-a-g-e\nWhat are the letters in « Romanian »?\nAnswer:",
24,
"Greedy",
"Sample 1",
],
]
initial_prompt_value = """استخراج العدد العاملي في لغة بايثون :
def factorial(n):
if n == 0:
return 1
else:
result = 1
for i in range(1, n + 1) :
result *= i
return result
print(factorial(5))""" |