acecalisto3 commited on
Commit
e1aedd2
·
verified ·
1 Parent(s): 145ab38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import os
2
  import gradio as gr
3
  from transformers import AutoModel, AutoTokenizer
4
 
5
- os.environ["GRADIO_SERVER_PORT"] = "8506"
6
 
7
  def get_code_generative_models():
8
  models_dir = os.path.join(os.getcwd(), "models")
@@ -48,7 +48,7 @@ def main():
48
 
49
  output.change(fn=infer, inputs=[model_name, input_data], outputs=output)
50
 
51
- interface = demo.launch()
52
 
53
  if __name__ == "__main__":
54
  main()
 
2
  import gradio as gr
3
  from transformers import AutoModel, AutoTokenizer
4
 
5
+ os.environ["GRADIO_SERVER_PORT"] = "8507"
6
 
7
  def get_code_generative_models():
8
  models_dir = os.path.join(os.getcwd(), "models")
 
48
 
49
  output.change(fn=infer, inputs=[model_name, input_data], outputs=output)
50
 
51
+ interface = demo.launch(server_port=get_free_port())
52
 
53
  if __name__ == "__main__":
54
  main()