Tile commited on
Commit
273fb56
1 Parent(s): a5bb713

first commit

Browse files
Files changed (1) hide show
  1. config.py +25 -0
config.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from conversation import conv_templates
3
+
4
+ application_conversation_map = {
5
+ "mm-rag": "default",
6
+ "llava-med": "llavamed_rag"
7
+ }
8
+
9
+ def get_conversation_template():
10
+ application = os.getenv("APPLICATION", "mm-rag")
11
+ print(f"Running application: {application}")
12
+ try:
13
+ if application.lower() in application_conversation_map.keys():
14
+ if application_conversation_map[application.lower()] in conv_templates.keys():
15
+ return conv_templates[application_conversation_map[application.lower()]]
16
+ else:
17
+ raise KeyError(f"Application {application} does not support yet!")
18
+ else:
19
+ raise KeyError(f"Application {application} does not support yet!")
20
+ except:
21
+ raise KeyError(f"Application {application} does not support yet!")
22
+
23
+ # get conversation template
24
+ cur_conv = get_conversation_template()
25
+