Spaces:
Runtime error
Runtime error
Commit
·
7ba69d0
1
Parent(s):
9461261
Update app.py
Browse files
app.py
CHANGED
@@ -1,20 +1,3 @@
|
|
1 |
from transformers import pipeline, set_send
|
2 |
generator = pipeline('text-generation', model='bigscience/bloom')
|
3 |
generator("Conversacion entre Sara y Emiliano", max_length=30, num_return_sequences=5)
|
4 |
-
|
5 |
-
context = '''Hola
|
6 |
-
Hola
|
7 |
-
Como estas
|
8 |
-
Bien y tu
|
9 |
-
Igual bien
|
10 |
-
Que haces
|
11 |
-
Nada y tu'''
|
12 |
-
|
13 |
-
context
|
14 |
-
|
15 |
-
while True:
|
16 |
-
output = generator(context, max_length=len(context) + 30, num_return_sequences=1)[0]['generated_text'].split(context)[1].split(\n)[0]
|
17 |
-
print(output)
|
18 |
-
context += output + '\nSara:'
|
19 |
-
inputText = input('Yo:')
|
20 |
-
context += inputText + '\nSara:'
|
|
|
1 |
from transformers import pipeline, set_send
|
2 |
generator = pipeline('text-generation', model='bigscience/bloom')
|
3 |
generator("Conversacion entre Sara y Emiliano", max_length=30, num_return_sequences=5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|