Skip to content

Commit

Permalink
feat: Add demo sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
saattrupdan committed Sep 18, 2024
1 parent 92af25a commit dd453ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ title: Røst ASR Demo
description: >
This is a demo of the Danish speech recognition model Røst. Speak into the microphone
and see the text appear on the screen!
# Sharing parameters
share: false
username: null
password: null
6 changes: 5 additions & 1 deletion src/scripts/run_asr_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def transcribe_audio(sampling_rate_and_audio: tuple[int, np.ndarray]) -> str:
description=config.description,
allow_flagging="never",
)
demo.launch()
if config.username is not None and config.password is not None:
auth = (config.username, config.password)
else:
auth = None
demo.launch(share=config.share, auth=auth)


if __name__ == "__main__":
Expand Down

0 comments on commit dd453ae

Please sign in to comment.