seawolf2357 commited on
Commit
6ba3a5c
·
verified ·
1 Parent(s): 6340284

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
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