Spaces:
Runtime error
Runtime error
Chaninder Rishi
commited on
Commit
·
8c2030d
1
Parent(s):
b8d216a
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import pandas as pd
|
2 |
import numpy as np
|
3 |
import csv
|
@@ -13,7 +14,6 @@ df = pd.read_csv('emily_election.csv')
|
|
13 |
|
14 |
loaded_model = pickle.load(open(filename, 'rb'))
|
15 |
|
16 |
-
"""
|
17 |
|
18 |
df['runtime'] = df['cumulative_ad_runtime'].apply(lambda s: int(s.split('days')[0]))
|
19 |
df['impressions'] = df['cumulative_impressions_by_region'].apply(lambda d: ast.literal_eval(d))
|
@@ -50,7 +50,7 @@ y = np.asanyarray(new_train[['log_impressions']])
|
|
50 |
regr.fit (x, y)
|
51 |
y_pred= regr.predict(new_train[['log_runtime', 'log_spend']])
|
52 |
|
53 |
-
|
54 |
# # The coefficients
|
55 |
#print(regr.coef_)
|
56 |
#print('R-squared score: %.2f' % regr.score(x, y))
|
|
|
1 |
+
import streamlit as st
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
import csv
|
|
|
14 |
|
15 |
loaded_model = pickle.load(open(filename, 'rb'))
|
16 |
|
|
|
17 |
|
18 |
df['runtime'] = df['cumulative_ad_runtime'].apply(lambda s: int(s.split('days')[0]))
|
19 |
df['impressions'] = df['cumulative_impressions_by_region'].apply(lambda d: ast.literal_eval(d))
|
|
|
50 |
regr.fit (x, y)
|
51 |
y_pred= regr.predict(new_train[['log_runtime', 'log_spend']])
|
52 |
|
53 |
+
|
54 |
# # The coefficients
|
55 |
#print(regr.coef_)
|
56 |
#print('R-squared score: %.2f' % regr.score(x, y))
|