Spaces:
Runtime error
Runtime error
Akshay Vs
commited on
Commit
•
4d6e76c
1
Parent(s):
5f669c2
Test UI
Browse files
app.py
CHANGED
@@ -6,11 +6,13 @@ import concurrent.futures
|
|
6 |
from random import randint
|
7 |
|
8 |
# initializing session_state
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
|
15 |
from transformers import pipeline, set_seed
|
16 |
|
@@ -29,17 +31,14 @@ def type_text(text):
|
|
29 |
sys.stdout.write(letter)
|
30 |
time.sleep(0)
|
31 |
|
32 |
-
text = input("Enter something to begin with... ")
|
33 |
-
print(".\n.\n.\nGenerating\n.\n.\n.")
|
34 |
|
35 |
-
for _ in range(50):
|
36 |
-
result = generate(text)
|
37 |
-
text=slice(result)
|
38 |
-
with concurrent.futures.ThreadPoolExecutor() as executor:
|
39 |
-
|
40 |
|
41 |
#Streamlit
|
42 |
-
|
43 |
-
st.markdown("<h1 style='text-align: center; color: white;'>I can generate intresting stories</h1>", unsafe_allow_html=True)
|
44 |
-
st.markdown('')
|
45 |
-
st.markdown('')
|
|
|
6 |
from random import randint
|
7 |
|
8 |
# initializing session_state
|
9 |
+
#os.system('pip install torch==1.10.2+cu113 torchvision==0.11.3+cu113 torchaudio===0.10.2+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html')
|
10 |
+
os.system('pip install transformers')
|
11 |
+
|
12 |
+
st.title("Story AI")
|
13 |
+
st.markdown("<h1 style='text-align: center; color: white;'>I can generate intresting stories</h1>", unsafe_allow_html=True)
|
14 |
+
st.markdown('')
|
15 |
+
st.markdown('')
|
16 |
|
17 |
from transformers import pipeline, set_seed
|
18 |
|
|
|
31 |
sys.stdout.write(letter)
|
32 |
time.sleep(0)
|
33 |
|
34 |
+
#text = input("Enter something to begin with... ")
|
35 |
+
#print(".\n.\n.\nGenerating\n.\n.\n.")
|
36 |
|
37 |
+
#for _ in range(50):
|
38 |
+
#result = generate(text)
|
39 |
+
#text=slice(result)
|
40 |
+
#with concurrent.futures.ThreadPoolExecutor() as executor:
|
41 |
+
# executor.submit(type_text, result.replace(text,""))
|
42 |
|
43 |
#Streamlit
|
44 |
+
|
|
|
|
|
|