Skip to content

Commit

Permalink
comment out stuff that needs torch
Browse files Browse the repository at this point in the history
  • Loading branch information
seplee committed Apr 14, 2024
1 parent c252b6f commit 11985a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 294 deletions.
8 changes: 4 additions & 4 deletions api/backend/handlers/answer_question.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ def answer_question_handler(question_audio: IO, data: QuestionTextRequestDto):
ask_question = build_ask_question()
answer_text = ask_question(question_text, data.text)

question_type = classify_question_type(question_text)
supplementary_info = build_supplementary_info(question_type)
followup_answer = supplementary_info(question_text, answer_text)
# question_type = classify_question_type(question_text)
# supplementary_info = build_supplementary_info(question_type)
# followup_answer = supplementary_info(question_text, answer_text)
# add follow-up answer:
# "here is an arxiv article related to your question.
# The title is "". The summary is "" and the authors are "".
# Would you like to hear the article?
# Or would you like to hear a summary of a different article"

text_to_speech = build_text_to_speech()
audio_content = text_to_speech(answer_text + followup_answer, data.emotion, data.speed)
audio_content = text_to_speech(answer_text, data.emotion, data.speed)

file_contents = io.BytesIO(audio_content)
file_contents.seek(0)
Expand Down
Loading

0 comments on commit 11985a8

Please sign in to comment.