Stefano Fiorucci commited on
Commit
c557ead
1 Parent(s): 1635e60

spotify webplayer and more

Browse files
Files changed (2) hide show
  1. .gitignore +2 -1
  2. app.py +10 -8
.gitignore CHANGED
@@ -151,4 +151,5 @@ cython_debug/
151
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
152
  #.idea/
153
 
154
- park/
 
151
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
152
  #.idea/
153
 
154
+ park/
155
+ mockup.py
app.py CHANGED
@@ -63,7 +63,6 @@ def main():
63
  # page_icon="https://static.wikia.nocookie.net/twinpeaks/images/4/4a/Site-favicon.ico/revision/latest?cb=20210710003705")
64
 
65
  pipe=start_haystack()
66
- # my_ip=subprocess.run(['curl', 'ifconfig.me'], stdout=subprocess.PIPE).stdout.decode('utf-8')
67
 
68
  # Persistent state
69
  set_state_if_absent('question', "Where is Twin Peaks?")
@@ -96,11 +95,12 @@ def main():
96
  st.write("# Who killed Laura Palmer?")
97
  st.write("### The first Twin Peaks Question Answering system!")
98
 
99
- st.markdown("""<br/>
100
- Ask any question on [Twin Peaks] (https://twinpeaks.fandom.com/wiki/Twin_Peaks) and see if the AI can find answer...!
 
101
 
102
  *Note: do not use keywords, but full-fledged questions.*
103
- """, unsafe_allow_html=True)
104
 
105
  # Sidebar
106
  st.sidebar.header("Who killed Laura Palmer?")
@@ -129,7 +129,7 @@ Ask any question on [Twin Peaks] (https://twinpeaks.fandom.com/wiki/Twin_Peaks)
129
  }}
130
  </style>
131
  <div class="haystack-footer">
132
- <p>Get it on <a href="https://github.com/deepset-ai/haystack/">GitHub</a> &nbsp;&nbsp; - &nbsp;&nbsp;
133
  Built with <a href="https://github.com/deepset-ai/haystack/">Haystack</a><br/>
134
  <small>Data crawled from <a href="https://twinpeaks.fandom.com/wiki/Twin_Peaks_Wiki">Twin Peaks Wiki</a>.</small>
135
  </p>
@@ -138,9 +138,11 @@ Ask any question on [Twin Peaks] (https://twinpeaks.fandom.com/wiki/Twin_Peaks)
138
  </div>
139
  """, unsafe_allow_html=True)
140
 
141
- # st.sidebar.image('https://static.wikia.nocookie.net/twinpeaks/images/e/ef/Laura_Palmer%2C_the_Queen_Of_Hearts.jpg', width=270) #use_column_width='always'
142
- song_i = random.randint(1,11)
143
- st.sidebar.audio(f'http://twinpeaks.narod.ru/Media/0{song_i}.mp3')
 
 
144
 
145
  # Search bar
146
  question = st.text_input("",
63
  # page_icon="https://static.wikia.nocookie.net/twinpeaks/images/4/4a/Site-favicon.ico/revision/latest?cb=20210710003705")
64
 
65
  pipe=start_haystack()
 
66
 
67
  # Persistent state
68
  set_state_if_absent('question', "Where is Twin Peaks?")
95
  st.write("# Who killed Laura Palmer?")
96
  st.write("### The first Twin Peaks Question Answering system!")
97
 
98
+ st.markdown("""
99
+ Ask any question about Twin Peaks [Twin Peaks] (https://twinpeaks.fandom.com/wiki/Twin_Peaks)
100
+ and see if the AI ​​can find an answer...
101
 
102
  *Note: do not use keywords, but full-fledged questions.*
103
+ """)
104
 
105
  # Sidebar
106
  st.sidebar.header("Who killed Laura Palmer?")
129
  }}
130
  </style>
131
  <div class="haystack-footer">
132
+ <p><a href="https://github.com/anakin87/who-killed-laura-palmer">GitHub</a> &nbsp;&nbsp; - &nbsp;&nbsp;
133
  Built with <a href="https://github.com/deepset-ai/haystack/">Haystack</a><br/>
134
  <small>Data crawled from <a href="https://twinpeaks.fandom.com/wiki/Twin_Peaks_Wiki">Twin Peaks Wiki</a>.</small>
135
  </p>
138
  </div>
139
  """, unsafe_allow_html=True)
140
 
141
+ # spotify webplayer
142
+ st.sidebar.markdown("""
143
+ <p align="center">
144
+ <iframe style="border-radius:12px" src="https://open.spotify.com/embed/playlist/38rrtWgflrw7grB37aMlsO?utm_source=generator" width="85%" height="380" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"></iframe>
145
+ </p>""", unsafe_allow_html=True)
146
 
147
  # Search bar
148
  question = st.text_input("",