Skip to content

Commit

Permalink
Merge pull request #19 from Himanshi-m/main
Browse files Browse the repository at this point in the history
Soothing Sounds bug fixes, Added Audio Controls
  • Loading branch information
Amna-Hassan04 authored Oct 3, 2024
2 parents 02999fa + f323212 commit ba7cf17
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ To set up SereniFi on your local machine, follow these steps:

## 🌟 Contributors

| ![Amna Hassan](https://avatars.githubusercontent.com/Amna-Hassan04?s=50) | ![Anushka Pote](https://avatars.githubusercontent.com/Anushka-Pote?s=50) | ![K. Madhuri](https://avatars.githubusercontent.com/pearll12?s=50) | ![Pearl V](https://avatars.githubusercontent.com/madhurik04?s=50) | ![Kiran Baliga](https://avatars.githubusercontent.com/KiranBaliga?s=50) |
| ![Amna Hassan](https://avatars.githubusercontent.com/Amna-Hassan04?s=50) | ![Anushka Pote](https://avatars.githubusercontent.com/Anushka-Pote?s=50) | ![K. Madhuri](https://avatars.githubusercontent.com/pearll12?s=50) | ![Pearl V](https://avatars.githubusercontent.com/madhurik04?s=50) | ![Kiran Baliga](https://avatars.githubusercontent.com/KiranBaliga?s=50) | ![Himanshi Maheshwari](https://avatars.githubusercontent.com/Himanshi-M?s=50) |

|:--:|:--:|:--:|:--:|
| [Amna Hassan](https://github.com/Amna-Hassan04) | [Anushka Pote](https://github.com/username2) | [K. Madhuri](https://github.com/username3) | [Pearl V](https://github.com/username4) |
[Kiran Baliga](https://github.com/KiranBaliga)
[Kiran Baliga](https://github.com/KiranBaliga) | [Himanshi Maheshwari](https://github.com/Himanshi-M) |

---

Expand Down
25 changes: 20 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,29 @@ def show_main_page():

def soothing_sounds():
st.header("🎵 Calm Down with Soothing Sounds")
#Contributions made by Himanshi-M
sound_options = {
"Rain": "https://example.com/rain_sound.mp3",
"Ocean Waves": "https://example.com/ocean_waves.mp3",
"Forest": "https://example.com/forest.mp3"
"Rain": "https://cdn.pixabay.com/audio/2022/05/13/audio_257112ce99.mp3",
"Ocean Waves": "https://cdn.pixabay.com/audio/2022/06/07/audio_b9bd4170e4.mp3",
"Forest": "https://cdn.pixabay.com/audio/2022/03/10/audio_4dedf5bf94.mp3",
"Birds Chirping":"https://cdn.pixabay.com/audio/2022/03/09/audio_c610232c26.mp3",
"River Flowing":"https://cdn.pixabay.com/audio/2024/07/30/audio_319893354c.mp3",
"White Noise":"https://cdn.pixabay.com/audio/2022/03/12/audio_b4f7e5a4ff.mp3",
"Pink Noise": "https://cdn.pixabay.com/audio/2023/10/07/audio_df9c190caf.mp3"
}
selected_sound = st.selectbox("Choose a sound to relax:", list(sound_options.keys()))
if st.button("Play Sound"):
st.audio(sound_options[selected_sound])
# Organizing the button, checkbox and volume slider on the same row
col1, col2, col3 = st.columns([1,1,2])
with col1:
playbutton=st.button("Play Sound")
with col2:
# Looping Checkbox
loopcheckbox = st.checkbox("Loop Sound")

if playbutton:
# Rendering the audio player and JS in the app
with col3:
st.audio(sound_options[selected_sound], format="audio/mp3", loop=loopcheckbox)

def interactive_journal():
if 'journal_entries' not in st.session_state:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
streamlit==1.25.0
streamlit==1.33.0
plotly==5.17.0
pandas==2.1.1
requests==2.31.0
Expand Down

0 comments on commit ba7cf17

Please sign in to comment.