Spaces:
Running
Running
Update app.py
Browse files
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"] = "
|
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()
|