-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
69 lines (63 loc) Β· 2.04 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import subprocess
print("THIS MAY TAKE A WHILE DEPENDING ON YOUR SYSTEM AND INTERNET SPEED\n\nPLEASE WAIT..\n\n")
try:
subprocess.run(["pip", "install", "-r", "requirements.txt"])
except KeyboardInterrupt:
print("DOWNLOAD STOPPED")
exit(0)
import os
import logging
logging.disable(logging.WARNING)
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # disabling warnings for gpu requirements
import sqlite3
conn = sqlite3.connect('Data/chats.db')
cursor = conn.cursor()
table = '''CREATE TABLE IF NOT EXISTS ASSISTANT (SERIAL_NO INTEGER PRIMARY KEY,
QUERY VARCHAR(255) NOT NULL ,
DATE_TIME VARCHAR(50) NOT NULL );'''
cursor.execute(table)
conn.commit()
try:
# importing prebuilt modules
import pyttsx3
from keras_preprocessing.sequence import pad_sequences
import numpy as np
from keras.models import load_model
from pickle import load
import speech_recognition as sr
import sys
from keras.preprocessing.text import Tokenizer
from keras_preprocessing.sequence import pad_sequences
from sklearn.preprocessing import LabelEncoder
from tensorflow.python.keras.models import Sequential
from tensorflow.python.keras.layers import Dense, Embedding, GlobalAveragePooling1D
import datetime
from dotenv import load_dotenv
from newsapi import NewsApiClient
import re
import requests
from wolframalpha import Client
import webbrowser
import wikipedia
import speedtest
from youtubesearchpython import VideosSearch
import smtplib
import io
import warnings
from PIL import Image
from stability_sdk import client
import stability_sdk.interfaces.gooseai.generation.generation_pb2 as generation
import math
import psutil
import time
from random import randint
import AppOpener
from pynput.keyboard import Key, Controller
from PIL import ImageGrab
import wmi
except ImportError:
print("MODULES NOT INSTALLED!")
exit(0)
except KeyboardInterrupt:
print("INTERRUPTED WHILE IMPORTING MODULES")
print("\n\nSETUP SUCCESSFUL")