Mahiruoshi commited on
Commit
98117dc
1 Parent(s): aa89e52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -144,7 +144,10 @@ class VitsGradio:
144
  return response['choices'][0]['text'].strip()
145
 
146
  def check_bot(self,api_input1,api_input2,local_chat1,local_chat2):
147
- self.api_key, self.api_secret = api_input1.split("|")
 
 
 
148
  if local_chat1:
149
  from transformers import AutoTokenizer, AutoModel
150
  self.tokenizer = AutoTokenizer.from_pretrained(api_input1, trust_remote_code=True)
 
144
  return response['choices'][0]['text'].strip()
145
 
146
  def check_bot(self,api_input1,api_input2,local_chat1,local_chat2):
147
+ try:
148
+ self.api_key, self.api_secret = api_input1.split("|")
149
+ except:
150
+ pass
151
  if local_chat1:
152
  from transformers import AutoTokenizer, AutoModel
153
  self.tokenizer = AutoTokenizer.from_pretrained(api_input1, trust_remote_code=True)