navhira commited on
Commit
702d521
·
1 Parent(s): 8c08288

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  pip install streamlit openai langchain
2
 
3
  import streamlit as st
@@ -17,4 +18,21 @@ with st.form('my_form'):
17
  if not openai_api_key.startswith('sk-'):
18
  st.warning('Please enter your OpenAI API key!', icon='⚠')
19
  if submitted and openai_api_key.startswith('sk-'):
20
- generate_response(text)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ '''
2
  pip install streamlit openai langchain
3
 
4
  import streamlit as st
 
18
  if not openai_api_key.startswith('sk-'):
19
  st.warning('Please enter your OpenAI API key!', icon='⚠')
20
  if submitted and openai_api_key.startswith('sk-'):
21
+ generate_response(text)
22
+ '''
23
+
24
+ import streamlit as st
25
+ from wordcloud import WordCloud
26
+ import matplotlib.pyplot as plt
27
+
28
+ # Create some sample text
29
+ text = 'Fun, fun, awesome, awesome, tubular, astounding, superb, great, amazing, amazing, amazing, amazing'
30
+
31
+ # Create and generate a word cloud image:
32
+ wordcloud = WordCloud().generate(text)
33
+
34
+ # Display the generated image:
35
+ plt.imshow(wordcloud, interpolation='bilinear')
36
+ plt.axis("off")
37
+ plt.show()
38
+ st.pyplot()