Skip to content

Commit

Permalink
improved long summaries
Browse files Browse the repository at this point in the history
  • Loading branch information
talosross committed Mar 17, 2024
1 parent 3751049 commit 45d694f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId = "com.talosross.summaryyou"
minSdk = 24
targetSdk = 34
versionCode = 2024022117
versionName = "1.1.8"
versionCode = 2024031712
versionName = "1.1.9"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/python/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,20 @@ def generate_summary(text: str, key: str, length: int, article: bool, language:
instructions = f"You will be provided with a transcript of a video, and your task is to generate a very short, concise summary with a maximum of 60 words of the transcript in {language}. If it includes a conclusion or key takeaway, make sure to include that in the end."
max_tokens = 170
else:
instructions = f"You will be provided with a transcript of a video, and your task is to generate a short, concise summary with a maximum of 120 words of the transcript in {language}. If it includes a conclusion or key takeaway, make sure to include that in the end."
max_tokens = 240
instructions = f"You will be provided with a transcript of a video, and your task is to generate a summary with of the transcript in {language}. If it includes a conclusion or key takeaway, make sure to include that in the end."
max_tokens = 350
else:
if language == "the same language as the ":
language = language + "article"
if length == 0:
instructions = f"You will be provided with an article, and your task is to generate a summary a very short, concise summary with a maximum of 20 word of the transcript in {language} using only 3 bullet points."
max_tokens = 110
elif length == 1:
instructions = f"You will be provided with an article, and your task is to generate a very short, concise summary with a maximum of 60 words of the transcript in {language}. If it includes a conclusion or key takeaway, make sure to include that as in the end."
instructions = f"You will be provided with an article, and your task is to generate a very short, concise summary with a maximum of 60 words of the transcript in {language}. If it includes a conclusion or key takeaway, make sure to include that in the end."
max_tokens = 170
else:
instructions = f"You will be provided with an article, and your task is to generate a short, concise summary with a maximum of 120 words of the transcript in {language}. If it includes a conclusion or key takeaway, make sure to include that as in the end."
max_tokens = 240
else:#
instructions = f"You will be provided with an article, and your task is to generate a summary with a maximum of the transcript in {language}. If it includes a conclusion or key takeaway, make sure to include that in the end."
max_tokens = 350

try:
response = client.chat.completions.create(
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Sep 03 14:05:48 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 45d694f

Please sign in to comment.