bkoz commited on
Commit
d2d4546
·
verified ·
1 Parent(s): 83b5519

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -14
app.py CHANGED
@@ -28,21 +28,20 @@ def greet(n):
28
  "How's the weather in Barcelona?",
29
  ]
30
 
31
- for prompt in prompts:
32
- print(f'Making inference... {prompt}')
33
- output = llm(
34
- prompt,
35
- max_tokens=512,
36
- temperature=0.4,
37
- grammar=grammar
38
- )
39
- print(f'Returned... {output}')
40
 
41
- s = output['choices'][0]['text']
42
- print(f'{s} , len(s) = {len(s)}')
43
- print(output['choices'])
44
- print(output['choices'][0]['text'])
45
- print()
46
 
47
  return f"Hello {s} Tensor"
48
 
 
28
  "How's the weather in Barcelona?",
29
  ]
30
 
31
+ print(f'Making inference... {prompt}')
32
+ output = llm(
33
+ prompt[0],
34
+ max_tokens=512,
35
+ temperature=0.4,
36
+ grammar=grammar
37
+ )
38
+ print(f'Returned... {output}')
 
39
 
40
+ s = output['choices'][0]['text']
41
+ print(f'{s} , len(s) = {len(s)}')
42
+ print(output['choices'])
43
+ print(output['choices'][0]['text'])
44
+ print()
45
 
46
  return f"Hello {s} Tensor"
47