nakas commited on
Commit
28052e5
·
verified ·
1 Parent(s): 43d514c

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -4
utils.py CHANGED
@@ -77,10 +77,8 @@ def validate_gradio_code(code):
77
  for match in launch_matches:
78
  if 'debug=' in match and 'debug=False' not in match:
79
  return False, "Debug mode is not allowed"
80
- if 'server_name=' in match and 'server_name="0.0.0.0"' not in match and 'server_name=\'0.0.0.0\'' not in match:
81
- return False, "Server must be bound to 0.0.0.0"
82
- if 'server_port=' in match and '7860' not in match:
83
- return False, "Server port must be 7860"
84
 
85
  return True, None
86
 
 
77
  for match in launch_matches:
78
  if 'debug=' in match and 'debug=False' not in match:
79
  return False, "Debug mode is not allowed"
80
+ if 'share=' in match and 'share=False' not in match and 'share=True' in match:
81
+ return False, "Share mode must be set to False"
 
 
82
 
83
  return True, None
84