Commit 10c8c8d8 authored by De Silva K.C.C.C's avatar De Silva K.C.C.C

topics API changes

parent 49dc3c62
# import libraries
from flask import Flask, request, send_file
from flask_cors import CORS
import json
import werkzeug
import os
import audio_gen as topic_gen
import bert as bert
import werkzeug
from flask import Flask, request, send_file
from flask_cors import CORS
from nltk.corpus import stopwords
s = set(stopwords.words('english'))
......@@ -14,7 +15,7 @@ CORS(app)
download_file = ''
# Topics API
@app.route('/topic', methods=['GET', 'POST'])
def topic():
imagefile = request.files['video']
......@@ -26,6 +27,7 @@ def topic():
download_file = 'upload/' + str(filename).replace('.mp4', '.txt')
text_list_from_video, all_text = topic_gen.split_video_file('upload/' + filename)
# Writing to a file
file1 = open(download_file, 'w')
file1.writelines(all_text)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment