-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
36 lines (32 loc) · 1.02 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import altair as alt
import pandas as pd
import streamlit as st
from PIL import Image
from PIL import ImageEnhance
img = 'IMG_8252.jpg'
img = Image.open(img)
enh = ImageEnhance.Contrast(img)
enh = enh.enhance(7)
enh = ImageEnhance.Sharpness(enh)
enh = enh.enhance(1.5)
enh = ImageEnhance.Color(enh)
enh = enh.enhance(10)
Rotated_image = enh.rotate(270)
dry = 'fart-83471.mp3'
wet = 'fart-9-228245.mp3'
spicy = 'fart-8-228244.mp3'
shart = 'unusual-sounding-fart-249278.mp3'
surprise = 'fartbumtrumpetpoop-99028.mp3'
fart = st.selectbox("What kind of fart do you want?",('None :/ I hate Winston','Dry', 'Wet', 'Spicy','Shart','Surprise'))
if fart == "Wet":
st.audio(wet,loop=True,autoplay=True)
if fart == "Dry":
st.audio(dry,loop=True,autoplay=True)
if fart == "Spicy":
st.audio(spicy,loop=True,autoplay=True)
if fart == "Shart":
st.audio(shart,loop=True,autoplay=True)
if fart == "Surprise":
st.audio(surprise,loop=True,autoplay=True)
st.write("This is Winston")
st.image(Rotated_image)