Pippoz commited on
Commit
429d718
1 Parent(s): 8f074bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -33,15 +33,14 @@ with col2:
33
  with col1:
34
  prompt= st.text_area('Your prompt here',
35
  '''AI will help humanity?''')
 
 
 
36
 
37
  # answer = ['ciao come stai stutto bene']
38
  # lst = ''.join(answer)
39
-
40
- answer = generator(prompt, max_length=60, no_repeat_ngram_size=2, early_stopping=True, num_beams=5)
41
- lst = answer[0]['generated_text']
42
-
43
-
44
- t = st.empty()
45
- for i in range(len(lst)):
46
- t.markdown(" %s..." % lst[0:i])
47
- time.sleep(0.04)
 
33
  with col1:
34
  prompt= st.text_area('Your prompt here',
35
  '''AI will help humanity?''')
36
+
37
+ answer = generator(prompt, max_length=60, no_repeat_ngram_size=2, early_stopping=True, num_beams=5)
38
+ lst = answer[0]['generated_text']
39
 
40
  # answer = ['ciao come stai stutto bene']
41
  # lst = ''.join(answer)
42
+
43
+ t = st.empty()
44
+ for i in range(len(lst)):
45
+ t.markdown(" %s..." % lst[0:i])
46
+ time.sleep(0.04)