Shaltiel commited on
Commit
e25195a
1 Parent(s): 3223bce

Moved concurrency limit to environment variable

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -7,6 +7,7 @@ from urllib.error import HTTPError
7
 
8
  API_URL = os.getenv('API_URL')
9
  API_KEY = os.getenv('API_KEY')
 
10
  oai_client = openai.OpenAI(api_key=API_KEY, base_url=API_URL)
11
 
12
  History = List[Tuple[str, str]]
@@ -96,7 +97,7 @@ with gr.Blocks(css='''
96
  textarea {
97
  font-size: 1.2em;
98
  }
99
- ''') as demo:
100
  gr.Markdown("""
101
  <div class="dicta-header">
102
  <a href="https://dicta.org.il">
@@ -117,7 +118,5 @@ with gr.Blocks(css='''
117
  interface.textbox.rtl = True
118
  interface.textbox.text_align = 'right'
119
  interface.theme_css += '.gr-group {direction: rtl !important;}'
120
-
121
-
122
 
123
- demo.queue(api_open=False, default_concurrency_limit=10).launch(max_threads=20, share=False, allowed_paths=['dicta-logo.jpg'])
 
7
 
8
  API_URL = os.getenv('API_URL')
9
  API_KEY = os.getenv('API_KEY')
10
+ CUSTOM_JS = os.getenv('CUSTOM_JS', None)
11
  oai_client = openai.OpenAI(api_key=API_KEY, base_url=API_URL)
12
 
13
  History = List[Tuple[str, str]]
 
97
  textarea {
98
  font-size: 1.2em;
99
  }
100
+ ''', js=CUSTOM_JS) as demo:
101
  gr.Markdown("""
102
  <div class="dicta-header">
103
  <a href="https://dicta.org.il">
 
118
  interface.textbox.rtl = True
119
  interface.textbox.text_align = 'right'
120
  interface.theme_css += '.gr-group {direction: rtl !important;}'
 
 
121
 
122
+ demo.queue(api_open=False).launch(max_threads=20, share=False, allowed_paths=['dicta-logo.jpg'])