Spaces:
Build error
Build error
osanseviero
commited on
Commit
•
5c42e06
1
Parent(s):
5ef6559
Create new file
Browse files- spaces_info.py +50 -0
spaces_info.py
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
description = """Gradio Demo for BLOOM. To use it, simply add your text, or click one of the examples to load them.
|
2 |
+
Tips:
|
3 |
+
- Do NOT talk to BLOOM as an entity, it's not a chatbot but a webpage/blog/article completion model.
|
4 |
+
- For the best results: MIMIC a few sentences of a webpage similar to the content you want to generate.
|
5 |
+
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.
|
6 |
+
Options:
|
7 |
+
- sampling: imaginative completions (may be not super accurate e.g. math/history)
|
8 |
+
- greedy: accurate completions (may be more boring or have repetitions)
|
9 |
+
"""
|
10 |
+
|
11 |
+
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.
|
12 |
+
Note:
|
13 |
+
1. For this WIP demo, only **sampling** is supported.
|
14 |
+
2. Rendering of the screenshot is currently not optimised. To experience the true speed of JAX / Flax, tick 'just output raw text'.
|
15 |
+
"""
|
16 |
+
|
17 |
+
examples = [
|
18 |
+
[
|
19 |
+
'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:',
|
20 |
+
64, "sampling", True],
|
21 |
+
['A poem about the beauty of science by Alfred Edgar Brittle\nTitle: The Magic Craft\nIn the old times', 64,
|
22 |
+
"sampling", True],
|
23 |
+
['استخراج العدد العاملي في لغة بايثون:', 64, "sampling", True],
|
24 |
+
["Pour déguster un ortolan, il faut tout d'abord", 64, "sampling", True],
|
25 |
+
[
|
26 |
+
'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 -',
|
27 |
+
64, "sampling", True],
|
28 |
+
[
|
29 |
+
'Estos ejemplos quitan vocales de las palabras\nEjemplos:\nhola - hl\nmanzana - mnzn\npapas - pps\nalacran - lcrn\npapa -',
|
30 |
+
64, "sampling", True],
|
31 |
+
["Question: If I put cheese into the fridge, will it melt?\nAnswer:", 64, "sampling", True],
|
32 |
+
["Math exercise - answers:\n34+10=44\n54+20=", 64, "sampling", True],
|
33 |
+
[
|
34 |
+
"Question: Where does the Greek Goddess Persephone spend half of the year when she is not with her mother?\nAnswer:",
|
35 |
+
64, "sampling", True],
|
36 |
+
[
|
37 |
+
"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:",
|
38 |
+
64, "sampling", True]
|
39 |
+
]
|
40 |
+
|
41 |
+
initial_prompt_value = """استخراج العدد العاملي في لغة بايثون :
|
42 |
+
def factorial(n):
|
43 |
+
if n == 0:
|
44 |
+
return 1
|
45 |
+
else:
|
46 |
+
result = 1
|
47 |
+
for i in range(1, n + 1) :
|
48 |
+
result *= i
|
49 |
+
return result
|
50 |
+
print(factorial(5))"""
|