debisoft commited on
Commit
bbc18c8
·
1 Parent(s): 0b5db02
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,10 +12,10 @@ databricks_token = os.getenv('TENATCH_TOKEN')
12
  model_uri = "http://15.152.197.215/v1/completions"
13
 
14
  def extract_json(gen_text, n_shot_learning=0):
15
- if(n_shot_learning == -1) :
16
- start_index = 0
17
- else :
18
- start_index = gen_text.index("### Response:\n{") + 14
19
  if(n_shot_learning > 0) :
20
  for i in range(0, n_shot_learning):
21
  gen_text = gen_text[start_index:]
 
12
  model_uri = "http://15.152.197.215/v1/completions"
13
 
14
  def extract_json(gen_text, n_shot_learning=0):
15
+ if(n_shot_learning == -1) :
16
+ start_index = 0
17
+ else :
18
+ start_index = gen_text.index("### Response:\n{") + 14
19
  if(n_shot_learning > 0) :
20
  for i in range(0, n_shot_learning):
21
  gen_text = gen_text[start_index:]