Spaces:
Runtime error
Runtime error
ermu2001
commited on
Commit
•
abbfe07
1
Parent(s):
08720f3
for gradio
Browse files
app.py
CHANGED
@@ -11,6 +11,11 @@ from chat_anything.azure_utils import AzureVoiceData
|
|
11 |
from chat_anything.chatbot.chat import set_openai_api_key
|
12 |
from utils import ChatWrapper, update_foo, reset_memory
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
ssl._create_default_https_context = ssl._create_unverified_context
|
15 |
|
16 |
|
@@ -230,10 +235,11 @@ with gr.Blocks() as block:
|
|
230 |
outputs=[llm_state, use_gpt4_state, chatbot, uid_state, video_file_path, audio_file_path])
|
231 |
|
232 |
if __name__ == "__main__":
|
233 |
-
import sys
|
234 |
-
if len(sys.argv) == 1:
|
235 |
-
|
236 |
-
else:
|
237 |
-
|
238 |
-
block.launch(debug=True, server_name="0.0.0.0",
|
239 |
-
|
|
|
|
11 |
from chat_anything.chatbot.chat import set_openai_api_key
|
12 |
from utils import ChatWrapper, update_foo, reset_memory
|
13 |
|
14 |
+
from python_scripts.prepare_models import prepare_face_generator_models, prepare_sadtalker_models
|
15 |
+
prepare_sadtalker_models()
|
16 |
+
prepare_face_generator_models()
|
17 |
+
|
18 |
+
|
19 |
ssl._create_default_https_context = ssl._create_unverified_context
|
20 |
|
21 |
|
|
|
235 |
outputs=[llm_state, use_gpt4_state, chatbot, uid_state, video_file_path, audio_file_path])
|
236 |
|
237 |
if __name__ == "__main__":
|
238 |
+
# import sys
|
239 |
+
# if len(sys.argv) == 1:
|
240 |
+
# port = 8901
|
241 |
+
# else:
|
242 |
+
# port = int(sys.argv[1])
|
243 |
+
# block.launch(debug=True, server_name="0.0.0.0",
|
244 |
+
# server_port=port, share=True, enable_queue = True)
|
245 |
+
block.launch()
|