Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Narendra Modi - Text Speeches Analysis #702

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
800 changes: 400 additions & 400 deletions Advertisement Click Prediction/Dataset/Social_Network_Ads.csv

Large diffs are not rendered by default.

90 changes: 45 additions & 45 deletions AirBus Ship Detection/Webapp/app.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# Save this script as 'app.py'
import streamlit as st
import torch
import torchvision.transforms as transforms
from PIL import Image
import numpy as np
# Function to load the pre-trained model
@st.cache(allow_output_mutation=True)
def load_model():
model = torch.load(r'Model\RNS_model.pkl', map_location=torch.device('cuda'))
model.eval()
return model
# Streamlit app
def main():
st.title("AirBus Ship detection with UNet Segmentation Model")
st.text("Upload an image for segmentation")
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg"])
if uploaded_file is not None:
image = Image.open(uploaded_file).convert("L")
st.image(image, caption='Uploaded Image.', use_column_width=True)
# Perform inference
transform = transforms.Compose([
transforms.Resize((256, 256)),
transforms.ToTensor(),
])
image_tensor = transform(image).unsqueeze(0).to('cuda' if torch.cuda.is_available() else 'cpu')
model = load_model()
with torch.no_grad():
output = model(image_tensor)
# Display segmentation result (assuming binary output)
mask = output.squeeze().cpu().numpy()
mask = (mask > 0.5).astype(np.uint8) # Threshold to create binary mask
st.image(mask * 255, caption='Segmentation Mask', use_column_width=True)
if __name__ == '__main__':
main()
# Save this script as 'app.py'

import streamlit as st
import torch
import torchvision.transforms as transforms
from PIL import Image
import numpy as np

# Function to load the pre-trained model
@st.cache(allow_output_mutation=True)
def load_model():
model = torch.load(r'Model\RNS_model.pkl', map_location=torch.device('cuda'))
model.eval()
return model

# Streamlit app
def main():
st.title("AirBus Ship detection with UNet Segmentation Model")
st.text("Upload an image for segmentation")

uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg"])

if uploaded_file is not None:
image = Image.open(uploaded_file).convert("L")
st.image(image, caption='Uploaded Image.', use_column_width=True)

# Perform inference
transform = transforms.Compose([
transforms.Resize((256, 256)),
transforms.ToTensor(),
])
image_tensor = transform(image).unsqueeze(0).to('cuda' if torch.cuda.is_available() else 'cpu')

model = load_model()
with torch.no_grad():
output = model(image_tensor)

# Display segmentation result (assuming binary output)
mask = output.squeeze().cpu().numpy()
mask = (mask > 0.5).astype(np.uint8) # Threshold to create binary mask

st.image(mask * 255, caption='Segmentation Mask', use_column_width=True)

if __name__ == '__main__':
main()
12,140 changes: 6,070 additions & 6,070 deletions Anime Data Analysis and Prediction/Dataset/All_Anime.csv

Large diffs are not rendered by default.

660 changes: 330 additions & 330 deletions Anime Data Analysis and Prediction/EDA Report/Anime EDA Report.html

Large diffs are not rendered by default.

660 changes: 330 additions & 330 deletions Anime Data Analysis and Prediction/EDA Report/Latest report year.html

Large diffs are not rendered by default.

Loading