Soratz commited on
Commit
1bb2d78
1 Parent(s): 6a19335

added share parameter to gradio

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -10,6 +10,8 @@ MAX_MAX_NEW_TOKENS = 4096
10
  DEFAULT_MAX_NEW_TOKENS = 256
11
  MAX_INPUT_TOKEN_LENGTH = 4000
12
 
 
 
13
  DESCRIPTION = """
14
  # [Mistral-7B](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1)
15
  """
@@ -241,4 +243,4 @@ with gr.Blocks(css='style.css') as demo:
241
  api_name=False,
242
  )
243
 
244
- demo.queue(max_size=32).launch(share=False, show_api=False)
 
10
  DEFAULT_MAX_NEW_TOKENS = 256
11
  MAX_INPUT_TOKEN_LENGTH = 4000
12
 
13
+ SHARE = os.environ.get("HF_SHARE", False)
14
+
15
  DESCRIPTION = """
16
  # [Mistral-7B](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1)
17
  """
 
243
  api_name=False,
244
  )
245
 
246
+ demo.queue(max_size=32).launch(share=SHARE, show_api=False)