Skip to content

Commit

Permalink
Merge pull request #284 from NexaAI/david/bugfix
Browse files Browse the repository at this point in the history
suppress log print in streamlit
  • Loading branch information
zhiyuan8 authored Nov 25, 2024
2 parents 235b07e + d3c7373 commit bfe4fcd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nexa/gguf/streamlit/streamlit_audio_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from st_audiorec import st_audiorec

from nexa.general import pull_model
from nexa.gguf.llama._utils_transformers import suppress_stdout_stderr
from nexa.gguf.nexa_inference_audio_lm import NexaAudioLMInference

# Initialize session state
Expand Down Expand Up @@ -45,7 +46,8 @@ def process_audio(nexa_model, audio_file, prompt=""):

try:
# Use the model's inference method directly
response = nexa_model.inference(temp_audio_path, prompt)
with suppress_stdout_stderr():
response = nexa_model.inference(temp_audio_path, prompt)
return response

except Exception as e:
Expand Down

0 comments on commit bfe4fcd

Please sign in to comment.