Skip to content

Commit

Permalink
works on asr
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi committed Sep 20, 2023
1 parent af6048b commit becb7c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion daras_ai_v2/glossary.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# ================================ Glossary UI ================================
def glossary_input(
label="##### Glossary\nUpload a google sheet, csv, or xlsx file.",
key="glossary_url",
key="glossary_documents",
):
from daras_ai_v2.doc_search_settings_widgets import document_uploader

Expand Down
5 changes: 4 additions & 1 deletion recipes/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class RequestModel(BaseModel):
selected_model: typing.Literal[tuple(e.name for e in AsrModels)] | None
language: str | None
google_translate_target: str | None
glossary_url: str | None
glossary_documents: list[str] | None
output_format: typing.Literal[tuple(e.name for e in AsrOutputFormat)] | None

class ResponseModel(BaseModel):
Expand Down Expand Up @@ -146,6 +146,9 @@ def run(self, state: dict):
source_language=forced_asr_languages.get(
selected_model, request.language
),
glossary_url=request.glossary_documents[0]
if request.glossary_documents
else "",
)
else:
# Save the raw ASR text for details view
Expand Down

0 comments on commit becb7c9

Please sign in to comment.