Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,18 @@ import matplotlib.pyplot as plt
|
|
8 |
import talib
|
9 |
import tech_indicators as ti
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
12 |
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
13 |
|
|
|
8 |
import talib
|
9 |
import tech_indicators as ti
|
10 |
|
11 |
+
import subprocess
|
12 |
+
import pkg_resources
|
13 |
+
|
14 |
+
required = {'TA-Lib'}
|
15 |
+
installed = {pkg.key for pkg in pkg_resources.working_set}
|
16 |
+
missing = required - installed
|
17 |
+
|
18 |
+
if missing:
|
19 |
+
python = sys.executable
|
20 |
+
subprocess.check_call([python, '-m', 'pip', 'install', *missing], stdout=subprocess.DEVNULL)
|
21 |
+
|
22 |
+
|
23 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
24 |
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
25 |
|