Xilixmeaty40 commited on
Commit
72fb43a
·
verified ·
1 Parent(s): 7b36c3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,7 +13,7 @@ clients = [InferenceClient(model) for model in models]
13
  VERBOSE = False
14
 
15
  def load_models(inp):
16
- if VERBOSE == True:
17
  print(type(inp))
18
  print(inp)
19
  print(models[inp])
@@ -25,7 +25,7 @@ def format_prompt(message, history, cust_p):
25
  for user_prompt, bot_response in history:
26
  prompt += f"<start_of_turn>user{user_prompt}<end_of_turn>"
27
  prompt += f"<start_of_turn>model{bot_response}<end_of_turn>"
28
- if VERBOSE == True:
29
  print(prompt)
30
  prompt += cust_p.replace("USER_INPUT", message)
31
  return prompt
@@ -81,7 +81,7 @@ def clear_fn():
81
  rand_val = random.randint(1, 1111111111111111)
82
 
83
  def check_rand(inp, val):
84
- if inp == True:
85
  return gr.Slider(label="Seed", minimum=1, maximum=1111111111111111, value=random.randint(1, 1111111111111111))
86
  else:
87
  return gr.Slider(label="Seed", minimum=1, maximum=1111111111111111, value=int(val))
 
13
  VERBOSE = False
14
 
15
  def load_models(inp):
16
+ if VERBOSE:
17
  print(type(inp))
18
  print(inp)
19
  print(models[inp])
 
25
  for user_prompt, bot_response in history:
26
  prompt += f"<start_of_turn>user{user_prompt}<end_of_turn>"
27
  prompt += f"<start_of_turn>model{bot_response}<end_of_turn>"
28
+ if VERBOSE:
29
  print(prompt)
30
  prompt += cust_p.replace("USER_INPUT", message)
31
  return prompt
 
81
  rand_val = random.randint(1, 1111111111111111)
82
 
83
  def check_rand(inp, val):
84
+ if inp:
85
  return gr.Slider(label="Seed", minimum=1, maximum=1111111111111111, value=random.randint(1, 1111111111111111))
86
  else:
87
  return gr.Slider(label="Seed", minimum=1, maximum=1111111111111111, value=int(val))