Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidqian123 committed Nov 7, 2024
1 parent a7f5293 commit 5cbf13d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nexa/gguf/nexa_inference_audio_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,20 @@ def run_streamlit(self, model_path: str, is_local_path = False, hf = False, proj
default="auto",
help="Device to use for inference (auto, cpu, or gpu)",
)
parser.add_argument(
"-st",
"--streamlit",
action="store_true",
help="Run the inference in Streamlit UI",
)

args = parser.parse_args()
kwargs = {k: v for k, v in vars(args).items() if v is not None}
model_path = kwargs.pop("model_path")
device = kwargs.pop("device", "auto")

inference = NexaAudioLMInference(model_path, device=device, **kwargs)
inference.run()
if args.streamlit:
inference.run_streamlit(model_path)
else:
inference.run()

0 comments on commit 5cbf13d

Please sign in to comment.