Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -28,21 +28,20 @@ def greet(n):
|
|
28 |
"How's the weather in Barcelona?",
|
29 |
]
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
print(f'Returned... {output}')
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
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 |
|