Spaces:
Running
Running
Update musicgen_app.py
Browse files- musicgen_app.py +3 -3
musicgen_app.py
CHANGED
@@ -245,7 +245,7 @@ def sentimentAnalysis(text):
|
|
245 |
def generateTime(input_text, time):
|
246 |
if time.value != 0:
|
247 |
# print("This piece will last "+str(time.value)+" second(s).")
|
248 |
-
return time.value
|
249 |
else:
|
250 |
timeSystem = "Your job is to estimate how long a certain text would last when spoken aloud by the average human being. Take intonation, phrasing, emphasis, and punctuation into account. When you are given a text, output the time it would take in seconds. Please do not provide any additional details, only the number value of the seconds it would take. The value must be an integer; do not include the word 'seconds' alongside it."
|
251 |
timeResponse = openai.ChatCompletion.create(
|
@@ -259,7 +259,7 @@ def generateTime(input_text, time):
|
|
259 |
timeOutput = timeResponse.choices[0].message['content']
|
260 |
#print("")
|
261 |
#print("This piece will last "+timeOutput+" second(s). This is how long it would take the average person to say this text aloud.")
|
262 |
-
return timeOutput
|
263 |
|
264 |
def generateParameters(sentiments, input_extra):
|
265 |
|
@@ -306,7 +306,7 @@ def ui_full(launch_kwargs):
|
|
306 |
gr.Markdown(
|
307 |
"""
|
308 |
# Immortal Beloved
|
309 |
-
This is your private program for Immortal Beloved, the software used to produce AI-generated music to be used in productions of "Man and Muse" by Rushil Byatnal.
|
310 |
Models used: Audiocraft by Meta, GPT-4 by OpenAI, and RoBERTa by Meta ([trained by Sam Lowe](https://huggingface.co/SamLowe/roberta-base-go_emotions))
|
311 |
"""
|
312 |
)
|
|
|
245 |
def generateTime(input_text, time):
|
246 |
if time.value != 0:
|
247 |
# print("This piece will last "+str(time.value)+" second(s).")
|
248 |
+
return int(time.value)
|
249 |
else:
|
250 |
timeSystem = "Your job is to estimate how long a certain text would last when spoken aloud by the average human being. Take intonation, phrasing, emphasis, and punctuation into account. When you are given a text, output the time it would take in seconds. Please do not provide any additional details, only the number value of the seconds it would take. The value must be an integer; do not include the word 'seconds' alongside it."
|
251 |
timeResponse = openai.ChatCompletion.create(
|
|
|
259 |
timeOutput = timeResponse.choices[0].message['content']
|
260 |
#print("")
|
261 |
#print("This piece will last "+timeOutput+" second(s). This is how long it would take the average person to say this text aloud.")
|
262 |
+
return int(timeOutput)
|
263 |
|
264 |
def generateParameters(sentiments, input_extra):
|
265 |
|
|
|
306 |
gr.Markdown(
|
307 |
"""
|
308 |
# Immortal Beloved
|
309 |
+
This is your private program for Immortal Beloved, the software used to produce AI-generated music to be used in productions of the play "Man and Muse" by Rushil Byatnal.
|
310 |
Models used: Audiocraft by Meta, GPT-4 by OpenAI, and RoBERTa by Meta ([trained by Sam Lowe](https://huggingface.co/SamLowe/roberta-base-go_emotions))
|
311 |
"""
|
312 |
)
|