Spaces:
Runtime error
Runtime error
Roland Ding
commited on
Commit
•
96778ed
1
Parent(s):
92454f1
1.1.2.7 checkpoint for app utility update and governing parameters.
Browse files- application.py +47 -0
- utility.py +7 -0
application.py
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
'''
|
2 |
+
shared environment variables
|
3 |
+
'''
|
4 |
+
default_domain = "cervical-cage"
|
5 |
+
|
6 |
+
aws_access_key_id = os.environ.get('AMRA_AWS_ACCESS_KEY_ID')
|
7 |
+
aws_secret_access_key = os.environ.get('AMRA_AWS_SECRET_ACCESS_KEY')
|
8 |
+
openai_api_key = os.environ.get('AMRA_OPENAI_API_KEY')
|
9 |
+
|
10 |
+
data_structure = {
|
11 |
+
"terms":{
|
12 |
+
"key":{
|
13 |
+
|
14 |
+
},
|
15 |
+
"fields":[
|
16 |
+
"assessment_step",
|
17 |
+
"term",
|
18 |
+
"clinical study",
|
19 |
+
"summary",
|
20 |
+
"command"
|
21 |
+
]},
|
22 |
+
"prompts":[
|
23 |
+
"assessment_step",
|
24 |
+
"template_name",
|
25 |
+
"instruction"
|
26 |
+
],
|
27 |
+
"articles":[
|
28 |
+
"domain",
|
29 |
+
"name",
|
30 |
+
"s3_path",
|
31 |
+
"vector",
|
32 |
+
"meta",
|
33 |
+
"content"
|
34 |
+
],
|
35 |
+
"outputs":[
|
36 |
+
"domain",
|
37 |
+
"article",
|
38 |
+
"output"
|
39 |
+
]
|
40 |
+
}
|
41 |
+
|
42 |
+
app_data = {
|
43 |
+
"articles":[],
|
44 |
+
"terms":[],
|
45 |
+
"prompts":[],
|
46 |
+
"outputs":[]
|
47 |
+
}
|
utility.py
CHANGED
@@ -43,6 +43,13 @@ data_structure = {
|
|
43 |
]
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
'''
|
47 |
following functions are for file manipulation
|
48 |
'''
|
|
|
43 |
]
|
44 |
}
|
45 |
|
46 |
+
app_data = {
|
47 |
+
"articles":[],
|
48 |
+
"terms":[],
|
49 |
+
"prompts":[],
|
50 |
+
"outputs":[]
|
51 |
+
}
|
52 |
+
|
53 |
'''
|
54 |
following functions are for file manipulation
|
55 |
'''
|