turn to work version

This commit is contained in:
2026-02-03 18:31:42 +07:00
parent 324ce0ddea
commit d736fe838a
8 changed files with 68 additions and 29 deletions

View File

@@ -6,8 +6,8 @@ from model_class import *
from mesh_utils import *
# Set environment variables
os.environ["GRADIO_SERVER_NAME"] = "0.0.0.0"
os.environ["GRADIO_SERVER_PORT"] = "8080"
#os.environ["GRADIO_SERVER_NAME"] = "0.0.0.0"
#os.environ["GRADIO_SERVER_PORT"] = 8080
os.environ["RKLLM_LOG_LEVEL"] = "1"
# Set resource limit
resource.setrlimit(resource.RLIMIT_NOFILE, (102400, 102400))
@@ -29,7 +29,7 @@ if __name__ == "__main__":
print(init_msg)
sys.stdout.flush()
rkllm_model = RKLLMLoaderClass(model=model)
model_init = f"RKLLM Model, {rkllm_model.model_name} has been initialized successfully!"
model_init = f"RKLLM Model, {rkllm_model.model_name} has been initialized successfully!"
print(model_init)
complete_init = "=============================="
print(complete_init)
@@ -106,7 +106,13 @@ if __name__ == "__main__":
# Enable the event queue system.
chatRKLLM.queue()
# Start the Gradio application.
chatRKLLM.launch()
chatRKLLM.launch(
server_name="0.0.0.0",
server_port=8080,
share=False,
show_error=True,
quiet=False
)
print("====================")
print("RKLLM model inference completed, releasing RKLLM model resources...")