mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-20 16:45:10 +00:00
seed tts models, youtube videos
This commit is contained in:
1 parent
2e61978258
commit
ff9c8e73e4
2 files changed
+28
-3
No files matched your search
+26
-1
@@ -3,6 +3,10 @@
|
||||
import requests
|
||||
import re
|
||||
import uuid
|
||||
import socket
|
||||
|
||||
# There are some things here that will cause my laptop to freeze!
|
||||
hostname = socket.gethostname()
|
||||
|
||||
def print_response(response):
|
||||
print('\tStatus: {}'.format(response.status_code))
|
||||
@@ -50,7 +54,7 @@ session_echelon = login('echelon', 'testing')
|
||||
session_nanashi = login('nanashi', 'nanashi')
|
||||
session_brandon = login('brandon', 'testing')
|
||||
|
||||
# ==================== UPLOAD DATA ====================
|
||||
# ==================== UPLOAD W2L TEMPLATES ====================
|
||||
|
||||
def upload_w2l_template(content_url, title, session_cookie):
|
||||
print('Upload W2L template')
|
||||
@@ -74,3 +78,24 @@ upload_w2l_template('https://i.imgur.com/uoGuTJo.jpeg', 'what do you mean vern?'
|
||||
upload_w2l_template('https://i.imgur.com/v8k9yau.jpeg', 'Miyamoto-san', session_brandon)
|
||||
|
||||
|
||||
if hostname == 'halide':
|
||||
upload_w2l_template('https://www.youtube.com/watch?v=a7mS9ZdU6k4', 'Steve Jobs talks', session_echelon)
|
||||
|
||||
# ==================== UPLOAD TTS MODELS ====================
|
||||
|
||||
def upload_tts_model(content_url, title, session_cookie):
|
||||
print('Upload TTS model')
|
||||
upload_url = 'http://localhost:12345/tts/upload'
|
||||
cookies = { 'session': session_cookie }
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': title,
|
||||
'download_url': content_url,
|
||||
}
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
print_response(r)
|
||||
|
||||
|
||||
upload_tts_model('https://drive.google.com/file/d/1grwDGbAsPwCMVfye071TZ6PLUub1KGyR/view?usp=sharing', 'Jorgen', session_nanashi)
|
||||
upload_tts_model('https://drive.google.com/file/d/1w3oBk5vzyHurqYwP95UEQv-_NeMNu6pt/view?usp=sharing', 'Noire', session_echelon)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u root \
|
||||
-proot \
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from w2l_templates\G"
|
||||
Reference in new issue
Block a user