You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reaching out. The file is stored on my local computer, but since I am trying to construct an ETL pipeline, the following document can be used as an example case: https://www.w3.org/TR/PNG/iso_8859-1.txt
how can I upload a text file to a language model in Video Indexer, using the Pythin API??
I have the following code:
files = {'this_file': open('thisfile.txt', 'rb')
accessString = '/trial/Accounts/'+accountId+'/Customization/Language?accessToken='+accessToken+'&modelName='+modelName+'&language='+language+'&%s'
headers = {
'Content-Type': 'multipart/form-data',
}
params = urllib.parse.urlencode({
})
try:
conn = http.client.HTTPSConnection('api.videoindexer.ai')
conn.request("POST", accessString % params, str(files), headers)
response = conn.getresponse()
modelInfo = response.read()
print(modelInfo)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
The text was updated successfully, but these errors were encountered: