-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b58da2
commit cd2e610
Showing
7 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from services.sentiment_calculator import sentiment_score | ||
|
||
def test_sentiment_scores_1(): | ||
text = "I really like this project" | ||
scores = sentiment_score(text) | ||
assert scores['positive_score'] > scores['neutral_score'] > scores['negative_score'] | ||
|
||
def test_sentiment_scores_2(): | ||
text = "I don't like lettuce" | ||
scores = sentiment_score(text) | ||
assert scores['positive_score'] < scores['neutral_score'] < scores['negative_score'] | ||
|
||
def test_sentiment_scores_3(): | ||
text = "The temperature today is 20 degrees Celsius." | ||
scores = sentiment_score(text) | ||
assert scores['positive_score'] < scores['neutral_score'] > scores['negative_score'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from services.summary import generate_summary | ||
|
||
def test_generate_summary(): | ||
text = "FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints." | ||
summary = generate_summary(text) | ||
assert "fastapi" in summary.lower() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from services.transcribe_audio import transcribe_audio_content | ||
|
||
def test_transcribe_audio_content(): | ||
audio_file_path = "static/test_transcribe.flac" | ||
transcript = transcribe_audio_content(speech_file=audio_file_path, model='default') | ||
assert "slushy" in transcript.lower() |