simpx commited on
Commit
f21b908
·
1 Parent(s): 774c8a9

remove sth

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -15,8 +15,6 @@ if len(config) > 1 and len(config[1].strip()) > 0:
15
  openai.api_base = config[1].strip()
16
 
17
  # config
18
- server_name = "0.0.0.0"
19
- server_port = 8000
20
  DEBUG = True
21
 
22
  '''
@@ -56,7 +54,7 @@ with gr.Blocks() as demo:
56
  with gr.Tab("Config"):
57
  with gr.Row():
58
  key_txt = gr.Textbox(label = "Openai Key", placeholder="Enter openai key 'sk-xxxx'%s" %
59
- (", Leave empty to use value from config file" if not openai.api_key else ""))
60
  url_txt = gr.Textbox(label = "Openai API Base URL", placeholder="Enter openai base url 'https://xxx', Leave empty to use value '%s'" % openai.api_base)
61
  system_message = gr.Textbox(label = "System Message:", value = "You are an assistant who gives brief and concise answers.")
62
 
@@ -81,5 +79,3 @@ with gr.Blocks() as demo:
81
 
82
  if __name__ == "__main__":
83
  demo.launch()
84
-
85
- #demo.launch(server_name=server_name, server_port=server_port)
 
15
  openai.api_base = config[1].strip()
16
 
17
  # config
 
 
18
  DEBUG = True
19
 
20
  '''
 
54
  with gr.Tab("Config"):
55
  with gr.Row():
56
  key_txt = gr.Textbox(label = "Openai Key", placeholder="Enter openai key 'sk-xxxx'%s" %
57
+ (", Leave empty to use value from config file" if openai.api_key else ""))
58
  url_txt = gr.Textbox(label = "Openai API Base URL", placeholder="Enter openai base url 'https://xxx', Leave empty to use value '%s'" % openai.api_base)
59
  system_message = gr.Textbox(label = "System Message:", value = "You are an assistant who gives brief and concise answers.")
60
 
 
79
 
80
  if __name__ == "__main__":
81
  demo.launch()