Spaces:
Runtime error
Runtime error
Akshay Vs
commited on
Commit
•
b495f34
1
Parent(s):
f894644
Added functionality
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ 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')
|
11 |
|
12 |
from transformers import pipeline, set_seed
|
13 |
|
@@ -44,9 +44,10 @@ 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 |
for _ in range(50):
|
48 |
result = generate(text)
|
49 |
text=slice(result)
|
50 |
-
|
51 |
#with concurrent.futures.ThreadPoolExecutor() as executor:
|
52 |
# executor.submit(type_text, result.replace(text,""))
|
|
|
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')
|
11 |
|
12 |
from transformers import pipeline, set_seed
|
13 |
|
|
|
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,""))
|