tykiww commited on
Commit
b1cf10f
1 Parent(s): b8b0aaa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -1,8 +1,23 @@
1
  ##################################### Imports ######################################
2
  import gradio as gr
 
 
3
 
4
 
5
  ########################### Global objects and functions ###########################
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  def greet(model_name, prompt_template, name):
7
  return f"Hello {name}!! Using model: {model_name} with template: {prompt_template}"
8
 
 
1
  ##################################### Imports ######################################
2
  import gradio as gr
3
+ import json
4
+ import os
5
 
6
 
7
  ########################### Global objects and functions ###########################
8
+
9
+ def get_json_cfg():
10
+ """Retrieve configuration file"""
11
+
12
+ config_path = os.getenv('CONFIG_PATH')
13
+ with open(config_path, 'r') as file:
14
+ config = json.load(file)
15
+
16
+ return config
17
+
18
+ print(get_json_cfg())
19
+
20
+
21
  def greet(model_name, prompt_template, name):
22
  return f"Hello {name}!! Using model: {model_name} with template: {prompt_template}"
23