Spaces:
Build error
Build error
next-social
commited on
Commit
•
3a2d51b
1
Parent(s):
6eaf242
fix
Browse files- Dockerfile +1 -1
- requirements.txt +1 -2
- server.py +13 -19
Dockerfile
CHANGED
@@ -17,4 +17,4 @@ COPY --chown=user . $HOME/app
|
|
17 |
|
18 |
EXPOSE 7860
|
19 |
|
20 |
-
CMD ["sh", "-c", "python3 server.py --notebook --
|
|
|
17 |
|
18 |
EXPOSE 7860
|
19 |
|
20 |
+
CMD ["sh", "-c", "python3 server.py --notebook --listen"]
|
requirements.txt
CHANGED
@@ -2,8 +2,7 @@ accelerate==0.19.0
|
|
2 |
colorama
|
3 |
datasets
|
4 |
flexgen==0.1.7
|
5 |
-
|
6 |
-
gradio==3.31.0
|
7 |
markdown
|
8 |
numpy
|
9 |
pandas
|
|
|
2 |
colorama
|
3 |
datasets
|
4 |
flexgen==0.1.7
|
5 |
+
gradio==3.32.0
|
|
|
6 |
markdown
|
7 |
numpy
|
8 |
pandas
|
server.py
CHANGED
@@ -786,13 +786,15 @@ def create_interface():
|
|
786 |
# Extensions block
|
787 |
extensions_module.create_extensions_block()
|
788 |
|
789 |
-
|
790 |
# Launch the interface
|
791 |
shared.gradio['interface'].queue()
|
|
|
792 |
if shared.args.listen:
|
793 |
-
shared.gradio['interface'].launch(
|
794 |
else:
|
795 |
-
shared.gradio['interface'].launch(
|
|
|
796 |
|
797 |
|
798 |
if __name__ == "__main__":
|
@@ -873,20 +875,12 @@ if __name__ == "__main__":
|
|
873 |
# add_lora_to_model(shared.args.lora)
|
874 |
|
875 |
# Force a character to be loaded
|
876 |
-
if shared.is_chat():
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
print("start create_interface")
|
884 |
# Launch the web UI
|
885 |
-
create_interface()
|
886 |
-
while True:
|
887 |
-
time.sleep(0.5)
|
888 |
-
if shared.need_restart:
|
889 |
-
shared.need_restart = False
|
890 |
-
shared.gradio['interface'].close()
|
891 |
-
time.sleep(0.5)
|
892 |
-
create_interface()
|
|
|
786 |
# Extensions block
|
787 |
extensions_module.create_extensions_block()
|
788 |
|
789 |
+
logging.info('start to Launch the interface')
|
790 |
# Launch the interface
|
791 |
shared.gradio['interface'].queue()
|
792 |
+
logging.info('start to queue')
|
793 |
if shared.args.listen:
|
794 |
+
shared.gradio['interface'].launch(share=shared.args.share, server_name=shared.args.listen_host or '0.0.0.0', server_port=shared.args.listen_port, inbrowser=shared.args.auto_launch, auth=auth)
|
795 |
else:
|
796 |
+
shared.gradio['interface'].launch(share=shared.args.share, server_port=shared.args.listen_port, inbrowser=shared.args.auto_launch, auth=auth)
|
797 |
+
logging.info('end launch')
|
798 |
|
799 |
|
800 |
if __name__ == "__main__":
|
|
|
875 |
# add_lora_to_model(shared.args.lora)
|
876 |
|
877 |
# Force a character to be loaded
|
878 |
+
# if shared.is_chat():
|
879 |
+
# shared.persistent_interface_state.update({
|
880 |
+
# 'mode': shared.settings['mode'],
|
881 |
+
# 'character_menu': shared.args.character or shared.settings['character'],
|
882 |
+
# 'instruction_template': shared.settings['instruction_template']
|
883 |
+
# })
|
884 |
+
logging.info('start create_interface')
|
|
|
885 |
# Launch the web UI
|
886 |
+
create_interface()
|
|
|
|
|
|
|
|
|
|
|
|
|
|