Found 19 repositories(showing 19)
xgorn
Telegram bot to upload HTTP/HTTPS direct link & youtube-dl, clone of TG-URL-Uploader
XRoiDX
No description available
Akashakashav
No description available
Haniomry5
No description available
releaseuserbot
#WORKING https://github.com/kalanakt/All-Url-Uploader
fazanul
No description available
Suramusic
No description available
freecontent
No description available
Satyajeetkumarofficial
No description available
Kali922
No description available
sivaezhumalai2002
No description available
Untitle-mm
No description available
mdshakilhasan9357
No description available
ToxicDeveloperr
No description available
Samantha-a
No description available
darknoob786
No description available
Krishnakant-K2
No description available
Satyajeetkumarofficial
No description available
karunyatej
age classification.ipynb Code cell <0tsqCqcl3kss> #%% [code] !pip install ipython.autotime %load_ext autotime Code cell <zsBlW5nVohn2> #%% [code] !pip install bing-image-downloader Code cell <uoeimVPk54f1> #%% [code] !mkdir images Code cell <jlir3uXmsPfR> #%% [code] from bing_image_downloader import downloader downloader.download("pretty sunflower",limit=30,output_dir='images', adult_filter_off=True) Code cell <jRJVTOdCt0wU> #%% [code] from bing_image_downloader import downloader downloader.download("rugby ball leather",limit=30,output_dir='images', adult_filter_off=True) Code cell <bYuDNaLX9YNT> #%% [code] from bing_image_downloader import downloader downloader.download("ice cream cone",limit=30,output_dir='images', adult_filter_off=True) Code cell <XQHB3brb5QVm> #%% [code] import numpy as np a=np.array([[1,2,3,4,5], [4,5,6,7,8]]) a.ndim Code cell <hxAEF36n517I> #%% [code] a.flatten() Code cell <_vMwn9yL4aBP> #%% [code] import os import matplotlib.pyplot as plt import numpy as np from skimage.io import imread from skimage.transform import resize target = [] images = [] flat_data = [] DATADIR = '/content/images' CATEGORIES = ['pretty sunflower','rugby ball leather','ice cream cone'] for category in CATEGORIES: class_num = CATEGORIES.index(category) path = os.path.join(DATADIR,category) for img in os.listdir(path): img_array = imread(os.path.join(path,img)) img_resized = resize(img_array,(150,150,3)) flat_data.append(img_resized.flatten()) images.append(img_resized) target.append(class_num) flat_data = np.array(flat_data) target = np.array(target) images = np.array(images) Code cell <78is7SWw3uXj> #%% [code] len(flat_data[0]) Code cell <itQ-irFH_bAO> #%% [code] 150*150*3 Code cell <DyT8OqF0_gMH> #%% [code] target Code cell <HbTPyqTR_lYb> #%% [code] unique,count = np.unique(target,return_counts=True) plt.bar(CATEGORIES,count) Code cell <mEWXcvXTAKmr> #%% [code] from sklearn.model_selection import train_test_split x_train,x_test,y_train,y_test = train_test_split(flat_data,target, test_size=0.3,random_state=109) Code cell <6tyItanBBUoZ> #%% [code] from sklearn.model_selection import GridSearchCV from sklearn import svm param_grid = [ {'C':[1,10,100,1000],'kernel':['linear']}, {'C':[1,10,100,1000],'gamma':[0.001,0.0001],'kernel':['rbf']}, ] svc = svm.SVC(probability=True) clf = GridSearchCV(svc,param_grid) clf.fit(x_train,y_train) Code cell <v7lTRylbDdLt> #%% [code] y_pred = clf.predict(x_test) y_pred Code cell <jqNz1cVTFfBO> #%% [code] y_test Code cell <_homxmCMFlOT> #%% [code] from sklearn.metrics import accuracy_score,confusion_matrix Code cell <E23BtImDFwfz> #%% [code] accuracy_score(y_pred,y_test) Code cell <sBUtSy_fF4do> #%% [code] confusion_matrix(y_pred,y_test) Code cell <RfjhohB3GC12> #%% [code] import pickle pickle.dump(clf,open('img_model.p','wb')) Code cell <v3EPq-IsGlyu> #%% [code] model = pickle.load(open('img_model.p','rb')) Code cell <9SkBQVVVG2hc> #%% [code] flat_data = [] url = input('Enter Your URL') img = imread(url) img_resized = resize(img,(150,150,3)) flat_data.append(img_resized.flatten()) flat_data = np.array(flat_data) print(img.shape) plt.imshow(img_resized) y_out = model.predict(flat_data) y_out = CATEGORIES[y_out[0]] print(f' PREDICTED OUTPUT: {y_out}') Code cell <GXX8FK-IIa0O> #%% [code] !pip install streamlit !pip install pyngrok from pyngrok import ngrok Code cell <pobVvyquJ9TM> #%% [code] %%writefile app.py import streamlit as st import numpy as np from skimage.io import imread from skimage.transform import resize import picklefrom PIL import Image st.title('Image Classifier using Machine Learning') st.text('Upload the Image') model = pickle.load(open('img_model.p','rb')) uploaded_file = st.file_uploader("Choose an image...", type="jpg") if uploaded_file is not None: img = Image.open(uploaded_file) st.image(img,caption='Uploaded Image') if st.button('PREDICT'): CATEGORIES = ['pretty sunflower','rugby ball leather','ice cream cone'] st.write('Result...') flat_data=[] img = np.array(img) img_resized = resize(img,(150,150,3)) flat_data.append(img_resized.flatten()) flat_data = np.array(flat_data) y_out = model.predict(flat_data) y_out = CATEGORIES[y_out[0]] st.title(f' PREDICTED OUTPUT: {y_out}') q = model.predict_proba(flat_data) for index, item in enumerate(CATEGORIES): st.write(f'{item} : {q[0][index]*100}') Code cell <IYsrzoQRLGRd> #%% [code] !nohup streamlit run app.py & url = ngrok.connect(port='8501') url Code cell <bjK19-zKLifc> #%% [code]
All 19 repositories loaded