Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
import os
|
|
|
4 |
import shutil
|
5 |
os.environ['TOKENIZERS_PARALLELISM'] = 'true'
|
6 |
os.environ['SPCONV_ALGO'] = 'native'
|
@@ -265,6 +266,10 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
|
|
265 |
|
266 |
# Launch the Gradio app
|
267 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
268 |
pipeline = TrellisTextTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-text-xlarge")
|
269 |
pipeline.cuda()
|
270 |
-
demo.launch(show_error=True,server_name="0.0.0.0",server_port=
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
import os
|
4 |
+
import argparse
|
5 |
import shutil
|
6 |
os.environ['TOKENIZERS_PARALLELISM'] = 'true'
|
7 |
os.environ['SPCONV_ALGO'] = 'native'
|
|
|
266 |
|
267 |
# Launch the Gradio app
|
268 |
if __name__ == "__main__":
|
269 |
+
parser = argparse.ArgumentParser(description="Gradio app with command-line port argument")
|
270 |
+
parser.add_argument("--port", type=int, default=10000, help="Port to run the Gradio app on")
|
271 |
+
args = parser.parse_args()
|
272 |
+
port = args.port
|
273 |
pipeline = TrellisTextTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-text-xlarge")
|
274 |
pipeline.cuda()
|
275 |
+
demo.launch(show_error=True,server_name="0.0.0.0",server_port=port)
|