deeksonparlma commited on
Commit ·
4e8eb95
1
Parent(s): 291e47a
fix run out of data error
Browse filesFiles changed (3)
- app.py-4
- data_train.csvAdded
- model.ipynb+9-84
86 unmodified lines87888990919293949596979886 unmodified linesdata = json.load(file)with open("data.pickle", "rb") as f:data = pd.read_pickle(f)words, labels, training, output = pickle.load(f)df = pd.DataFrame(data)df.to_csv('data_train.csv', index=False)net = tflearn.input_data(shape=[None, len(training[0])])net = tflearn.fully_connected(net, 8)net = tflearn.fully_connected(net, 8)86 unmodified lines878889909192939486 unmodified linesdata = json.load(file)with open("data.pickle", "rb") as f:words, labels, training, output = pickle.load(f)net = tflearn.input_data(shape=[None, len(training[0])])net = tflearn.fully_connected(net, 8)net = tflearn.fully_connected(net, 8)
4 unmodified lines5678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929333 unmodified lines1271281291301311321334 unmodified lines"execution_count": 2,"id": "ace57031","metadata": {},"outputs": [{"data": {"text/html": ["<div>\n","<style scoped>\n"," .dataframe tbody tr th:only-of-type {\n"," vertical-align: middle;\n"," }\n","\n"," .dataframe tbody tr th {\n"," vertical-align: top;\n"," }\n","\n"," .dataframe thead th {\n"," text-align: right;\n"," }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n"," <thead>\n"," <tr style=\"text-align: right;\">\n"," <th></th>\n"," <th>Question_ID</th>\n"," <th>Questions</th>\n"," <th>Answers</th>\n"," </tr>\n"," </thead>\n"," <tbody>\n"," <tr>\n"," <th>0</th>\n"," <td>1590140</td>\n"," <td>What does it mean to have a mental illness?</td>\n"," <td>Mental illnesses are health conditions that di...</td>\n"," </tr>\n"," <tr>\n"," <th>1</th>\n"," <td>2110618</td>\n"," <td>Who does mental illness affect?</td>\n"," <td>It is estimated that mental illness affects 1 ...</td>\n"," </tr>\n"," <tr>\n"," <th>2</th>\n"," <td>6361820</td>\n"," <td>What causes mental illness?</td>\n"," <td>It is estimated that mental illness affects 1 ...</td>\n"," </tr>\n"," <tr>\n"," <th>3</th>\n"," <td>9434130</td>\n"," <td>What are some of the warning signs of mental i...</td>\n"," <td>Symptoms of mental health disorders vary depen...</td>\n"," </tr>\n"," <tr>\n"," <th>4</th>\n"," <td>7657263</td>\n"," <td>Can people with mental illness recover?</td>\n"," <td>When healing from mental illness, early identi...</td>\n"," </tr>\n"," </tbody>\n","</table>\n","</div>"],"text/plain": [" Question_ID Questions \\\n","0 1590140 What does it mean to have a mental illness? \n","1 2110618 Who does mental illness affect? \n","2 6361820 What causes mental illness? \n","3 9434130 What are some of the warning signs of mental i... \n","4 7657263 Can people with mental illness recover? \n","\n"," Answers \n","0 Mental illnesses are health conditions that di... \n","1 It is estimated that mental illness affects 1 ... \n","2 It is estimated that mental illness affects 1 ... \n","3 Symptoms of mental health disorders vary depen... \n","4 When healing from mental illness, early identi... "]},"execution_count": 2,"metadata": {},"output_type": "execute_result"}],"source": ["from sklearn.feature_extraction.text import TfidfVectorizer\n","from sklearn.model_selection import train_test_split\n",33 unmodified lines" pass\n","\n","data = pd.read_csv(\"data.csv\")\n","data.head()"]},{4 unmodified lines56789101133 unmodified lines45464748495051525354555657584 unmodified lines"execution_count": 2,"id": "ace57031","metadata": {},"outputs": [],"source": ["from sklearn.feature_extraction.text import TfidfVectorizer\n","from sklearn.model_selection import train_test_split\n",33 unmodified lines" pass\n","\n","data = pd.read_csv(\"data.csv\")\n","data.head()\n","\n","with open(\"data.pickle\", \"rb\") as f:\n"," data = pd.read_pickle(f)\n","# words, labels, training, output = pickle.load(f)\n","\n","df = pd.DataFrame(data)\n","df.to_csv('data_train.csv', index=False)"]},{
app.py-4
data_train.csvAdded
model.ipynb+9-84