Arnaudding001 commited on
Commit
540f528
β€’
1 Parent(s): 1c20cd5

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +57 -0
app.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import joblib
3
+ import numpy as np
4
+ import pandas as pd
5
+ from MLmodel import PrepProcesor, columns
6
+ model = joblib.load('F:\ζˆ‘ηš„ι‡εŒ–\Risk_protocol\LGmodel.joblib')
7
+
8
+
9
+ st.title("Did the project succeed")
10
+ Wallet_distribution = st.select_slider('Choose distribution score', [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0])
11
+ Whale_anomalie_activities = st.select_slider('Choose anomalie activities', [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0])
12
+ Locked_period = st.slider('Remaining days to next unlocked date', 0,180)
13
+ Operation_duration = st.number_input('Operation duration', 0,1000)
14
+ PR_articles = st.number_input('PR article number', 0, 1000)
15
+ Decentralized_transaction = st.select_slider('Transactions percentage in decentralized exchanges',[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0] )
16
+ twitter_followers_growthrate = st.number_input('twitter followers increased rate', -0.5,0.5)
17
+ unique_address_growthrate = st.select_slider('Unique address weekly growth rate', [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0])
18
+ month_transaction_growthrate = st.number_input('Monthly transaction increased rate', -0.5,3.0)
19
+ github_update = st.number_input("Project's github monthly update frequency", 0, 30)
20
+ code_review_report = st.select_slider('Has a review report or no, true=0, false=1', [0, 1])
21
+ publicChain_safety = st.number_input('How many vulnerabilities for the used blockchain', 0,100)
22
+ investedProjects = st.select_slider('Risky invested projects weight', [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0])
23
+ token_price = st.number_input('Input the token price', 0.0, 1000.0)
24
+ token_voltality_overDot = st.number_input('Input the token price voltality over the Dot price', -0.5,3.0)
25
+ negative = st.number_input('twitter comments? Negative=-1', 0,1)
26
+ neutre = st.number_input('twitter comments? neutre=0', 0,1)
27
+ positive = st.number_input('twitter comments? positive=1', 0,1)
28
+ KOL_comments = st.slider('How many negative comments that the KOLs have made', 0,100)
29
+ media_negatifReport = st.number_input('How many negative media report concerning this project', 0,100)
30
+
31
+
32
+ #st.text_input('Input passenger id', '12345')
33
+ # passengerclass = st.select_slider('Choose passenger class', [1,2,3])
34
+ # name = st.text_input('Input the passenger name', 'John Smith')
35
+ # gender = st.select_slider('Select gender', ['male', 'female'])
36
+ # age = st.slider('Input age', 0,100)
37
+ # sibsp = st.slider('Input siblings', 0, 10)
38
+ # parch = st.slider('Input parents/children', 0, 2)
39
+ # ticketid = st.number_input('Ticket number', 12345)
40
+ # fare = st.number_input('Fare amount', 0,100)
41
+ # cabin = st.text_input('Enter cabin', 'C52')
42
+ # embarked = st.selectbox('Choose embarkation point', ["S", "C","Q"])
43
+
44
+ def predict():
45
+ row = np.array([Wallet_distribution, Whale_anomalie_activities, Locked_period, Operation_duration, PR_articles, Decentralized_transaction,twitter_followers_growthrate, unique_address_growthrate, month_transaction_growthrate,
46
+ github_update, code_review_report, publicChain_safety, investedProjects,
47
+ token_price,token_voltality_overDot, negative, neutre, positive, KOL_comments, media_negatifReport])
48
+ X = pd.DataFrame([row], columns=columns)
49
+ prediction = model.predict(X)[0]
50
+
51
+ if prediction == 1:
52
+ st.success('Project succeed :thumbsup:')
53
+ else:
54
+ st.error("Project did not succeed :thumbsdown:")
55
+
56
+
57
+ trigger = st.button('Predict', on_click=predict)