futranbg commited on
Commit
a68ea86
1 Parent(s): 706d17f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -58,12 +58,14 @@ def generate(
58
  )
59
  seed = seed + 1
60
  formatted_prompt = format_prompt(prompt, history, system_prompt)
61
- status = client.get_model_status()
 
 
62
  if not status.loaded:
63
- client = client2
64
 
65
  try:
66
- stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
67
  output = ""
68
 
69
  for response in stream:
 
58
  )
59
  seed = seed + 1
60
  formatted_prompt = format_prompt(prompt, history, system_prompt)
61
+
62
+ cli = client
63
+ status = cli.get_model_status()
64
  if not status.loaded:
65
+ cli = client2
66
 
67
  try:
68
+ stream = cli.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
69
  output = ""
70
 
71
  for response in stream: