autonomous019 commited on
Commit
8cb5d67
1 Parent(s): d4e7720

Create new file

Browse files
Files changed (1) hide show
  1. spaces_info.py +76 -0
spaces_info.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - 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.
7
+
8
+ Options:
9
+ - sampling: imaginative completions (may be not super accurate e.g. math/history)
10
+ - greedy: accurate completions (may be more boring or have repetitions)
11
+ """
12
+
13
+ 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.
14
+ Note:
15
+ 1. For this WIP demo, only **sampling** is supported.
16
+ 2. Rendering of the screenshot is currently not optimised. To experience the true speed of JAX / Flax, tick 'just output raw text'.
17
+ """
18
+
19
+ examples = [
20
+ [
21
+ '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:',
22
+ 32,
23
+ "Sample",
24
+ "Sample 1",
25
+ ],
26
+ [
27
+ "A poem about the beauty of science by Alfred Edgar Brittle\nTitle: The Magic Craft\nIn the old times",
28
+ 50,
29
+ "Sample",
30
+ "Sample 1",
31
+ ],
32
+ ["استخراج العدد العاملي في لغة بايثون:", 30, "Greedy", "Sample 1"],
33
+ ["Pour déguster un ortolan, il faut tout d'abord", 32, "Sample", "Sample 1"],
34
+ [
35
+ "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 -",
36
+ 16,
37
+ "Sample",
38
+ "Sample 1",
39
+ ],
40
+ [
41
+ "Estos ejemplos quitan vocales de las palabras\nEjemplos:\nhola - hl\nmanzana - mnzn\npapas - pps\nalacran - lcrn\npapa -",
42
+ 16,
43
+ "Sample",
44
+ "Sample 1",
45
+ ],
46
+ [
47
+ "Question: If I put cheese into the fridge, will it melt?\nAnswer:",
48
+ 32,
49
+ "Sample",
50
+ "Sample 1",
51
+ ],
52
+ ["Math exercise - answers:\n34+10=44\n54+20=", 16, "Greedy", "Sample 1"],
53
+ [
54
+ "Question: Where does the Greek Goddess Persephone spend half of the year when she is not with her mother?\nAnswer:",
55
+ 24,
56
+ "Greedy",
57
+ "Sample 1",
58
+ ],
59
+ [
60
+ "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:",
61
+ 24,
62
+ "Greedy",
63
+ "Sample 1",
64
+ ],
65
+ ]
66
+
67
+ initial_prompt_value = """استخراج العدد العاملي في لغة بايثون :
68
+ def factorial(n):
69
+ if n == 0:
70
+ return 1
71
+ else:
72
+ result = 1
73
+ for i in range(1, n + 1) :
74
+ result *= i
75
+ return result
76
+ print(factorial(5))"""