Spaces:
Runtime error
Runtime error
initial commit vers 2
Browse files- .gitattributes +1 -0
- app.py +78 -0
- dataset.csv +3 -0
- img.png +0 -0
.gitattributes
CHANGED
|
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
dataset.csv filter=lfs diff=lfs merge=lfs -text
|
app.py
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# imports
|
| 2 |
+
# ====================================
|
| 3 |
+
|
| 4 |
+
import numpy as np
|
| 5 |
+
import pandas as pd
|
| 6 |
+
import seaborn as sns
|
| 7 |
+
from random import randint
|
| 8 |
+
import matplotlib.pyplot as plt
|
| 9 |
+
import streamlit as st
|
| 10 |
+
import streamlit.components.v1 as components
|
| 11 |
+
|
| 12 |
+
#from sklearn.linear_model import LogisticRegression
|
| 13 |
+
#from sklearn.svm import SVC
|
| 14 |
+
#from sklearn.neighbors import KNeighborsClassifier
|
| 15 |
+
#from sklearn.tree import DecisionTreeClassifier
|
| 16 |
+
#from sklearn.ensemble import RandomForestClassifier
|
| 17 |
+
|
| 18 |
+
#from sklearn.model_selection import train_test_split
|
| 19 |
+
#from sklearn.model_selection import StratifiedKFold
|
| 20 |
+
#from imblearn.pipeline import make_pipeline as imbalanced_make_pipeline
|
| 21 |
+
#from imblearn.over_sampling import SMOTE
|
| 22 |
+
#from sklearn.model_selection import RandomizedSearchCV
|
| 23 |
+
#from sklearn.metrics import classification_report, confusion_matrix, f1_score,accuracy_score, precision_score, recall_score, roc_auc_score
|
| 24 |
+
|
| 25 |
+
#from sklearn.feature_selection import SelectKBest
|
| 26 |
+
#from sklearn.feature_selection import f_classif
|
| 27 |
+
|
| 28 |
+
#import warnings
|
| 29 |
+
#warnings.filterwarnings("ignore")
|
| 30 |
+
|
| 31 |
+
# load upper
|
| 32 |
+
# ==================================
|
| 33 |
+
|
| 34 |
+
components.html(
|
| 35 |
+
"""
|
| 36 |
+
<a href="https://git.io/typing-svg"><img src="https://readme-typing-svg.herokuapp.com?font=Fira+Code&pause=1000&width=435&lines=Анализ+банкротства+компании" alt="Typing SVG" /></a>
|
| 37 |
+
<a href="https://git.io/typing-svg"><img src="https://readme-typing-svg.herokuapp.com?font=Fira+Code&pause=1000&width=435&lines=методами+искуственного+интеллекта" alt="Typing SVG" /></a>
|
| 38 |
+
"""
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
st.markdown("<h1 style='text-align: center;'>Применение методов машинного обучения в анализе банкротства</h1>", unsafe_allow_html=True)
|
| 42 |
+
|
| 43 |
+
components.html(
|
| 44 |
+
"""
|
| 45 |
+
<img src="https://fincult.info/upload/als-property-editorblock/4a2/4a278980ab4958de5e75aa5290842d77.png" align="center">
|
| 46 |
+
"""
|
| 47 |
+
)
|
| 48 |
+
|
| 49 |
+
#with open("D:\dev\to_git\test_task_ranhigs\Company_bankruptcy_prediction\for_web\img.png", "rb") as f:
|
| 50 |
+
# st.image(f.read(), use_column_width=True)
|
| 51 |
+
|
| 52 |
+
with st.expander("ℹ️ - О приложении", expanded=True):
|
| 53 |
+
|
| 54 |
+
st.write(
|
| 55 |
+
"""
|
| 56 |
+
- Это приложение — это простой в использовании интерфейс, встроенный в специальную библиотеку Streamlit.
|
| 57 |
+
- В том числе и сам алгоритм машинного обучения, который можно использовать через форму
|
| 58 |
+
"""
|
| 59 |
+
)
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
st.write(
|
| 63 |
+
"""
|
| 64 |
+
# Краткое описание
|
| 65 |
+
|
| 66 |
+
"""
|
| 67 |
+
)
|
| 68 |
+
|
| 69 |
+
# cleaning data
|
| 70 |
+
# ==================================
|
| 71 |
+
|
| 72 |
+
data = pd.read_csv("D:\dev\to_git\test_task_ranhigs\Company_bankruptcy_prediction\for_web\dataset.csv")
|
| 73 |
+
data.columns = [i.title().strip() for i in list(data.columns)]
|
| 74 |
+
|
| 75 |
+
row = data.shape[0]
|
| 76 |
+
col = data.shape[1]
|
| 77 |
+
|
| 78 |
+
text = print("The number of rows within the dataset are {} and the number of columns is {}".format(row,col))
|
dataset.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:67bf2e7c75490f7ad3f76bbce57d49cdc25967cdab607527b94f944863fa14d8
|
| 3 |
+
size 11456101
|
img.png
ADDED
|