Akshay Vs commited on
Commit
6815209
1 Parent(s): 73a3947

Added functionality

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -5,6 +5,10 @@ import streamlit as st
5
  import concurrent.futures
6
  from random import randint
7
 
 
 
 
 
8
  # initializing session_state
9
  os.system('pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu')
10
  os.system('pip install transformers')
@@ -36,18 +40,14 @@ def type_text(text):
36
  # executor.submit(type_text, result.replace(text,""))
37
 
38
  #Streamlit
39
-
40
-
41
- st.markdown("<h1 style='text-align: center; color: white;'>Generate intresting stories with GPT</h1>", unsafe_allow_html=True)
42
- st.markdown('')
43
- st.markdown('')
44
  text = st.text_input('Enter something to begin with...', placeholder='I look at her, then i realised', key="placeholder")
45
  if text:
46
- st.write("Generating...")
47
- text=""
 
48
  for _ in range(50):
49
  result = generate(text)
50
  text=slice(result)
51
- text=text+""+result
52
  #with concurrent.futures.ThreadPoolExecutor() as executor:
53
  # executor.submit(type_text, result.replace(text,""))
 
5
  import concurrent.futures
6
  from random import randint
7
 
8
+ st.markdown("<h1 style='text-align: center; color: white;'>Generate intresting stories with GPT</h1>", unsafe_allow_html=True)
9
+ st.markdown('')
10
+ st.markdown('')
11
+
12
  # initializing session_state
13
  os.system('pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu')
14
  os.system('pip install transformers')
 
40
  # executor.submit(type_text, result.replace(text,""))
41
 
42
  #Streamlit
 
 
 
 
 
43
  text = st.text_input('Enter something to begin with...', placeholder='I look at her, then i realised', key="placeholder")
44
  if text:
45
+ st.write("Generating...", text)
46
+ st.write("", text)
47
+
48
  for _ in range(50):
49
  result = generate(text)
50
  text=slice(result)
51
+ st.write(text, text)
52
  #with concurrent.futures.ThreadPoolExecutor() as executor:
53
  # executor.submit(type_text, result.replace(text,""))