Dhrumit1314 commited on
Commit
838043c
1 Parent(s): 3407029

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -40,9 +40,9 @@ def extract_video_id(youtube_link):
40
 
41
  @app.route('/', methods=['GET'])
42
  def hello():
43
- hostname = request.host
44
- domain = request.url_root
45
- user_agent = request.user_agent.string
46
 
47
  # h = f"<h1>Hello World</h1><p>Hostname: {hostname}</p><p>Domain: {domain}</p><p>User Agent: {user_agent}</p>"
48
  h = "<h1>This is the backend deployed web page created by NotivAI!!</h1>"
@@ -83,8 +83,8 @@ def upload_video():
83
  video_file_id = api.upload_file(
84
  token=token,
85
  path_or_fileobj=video_path,
86
- repo_id=namespace, # replace with your repository ID
87
- path_in_repo=video.filename # replace with the desired path in the repository
88
  )
89
 
90
  transcript = transcribe_audio(video_path)
@@ -253,7 +253,7 @@ def summarize_text_bart(text):
253
  print(f"Execution time for BART Model: {end_time - start_time} seconds")
254
  return output[0]
255
 
256
- # Spacy summarizer
257
  def summarizer(rawdocs):
258
  stopwords = list(STOP_WORDS)
259
  nlp = spacy.load('en_core_web_sm')
@@ -293,5 +293,4 @@ def summarizer(rawdocs):
293
 
294
  # Main run function
295
  if __name__ == '__main__':
296
- # os.chdir("E:/Centennial/SEMESTER 6/Software Development Project/backend/")
297
  app.run(debug=True, port=7860, host='0.0.0.0', use_reloader=False)
 
40
 
41
  @app.route('/', methods=['GET'])
42
  def hello():
43
+ # hostname = request.host
44
+ # domain = request.url_root
45
+ # user_agent = request.user_agent.string
46
 
47
  # h = f"<h1>Hello World</h1><p>Hostname: {hostname}</p><p>Domain: {domain}</p><p>User Agent: {user_agent}</p>"
48
  h = "<h1>This is the backend deployed web page created by NotivAI!!</h1>"
 
83
  video_file_id = api.upload_file(
84
  token=token,
85
  path_or_fileobj=video_path,
86
+ repo_id=namespace,
87
+ path_in_repo=video.filename
88
  )
89
 
90
  transcript = transcribe_audio(video_path)
 
253
  print(f"Execution time for BART Model: {end_time - start_time} seconds")
254
  return output[0]
255
 
256
+ # Spacy Summarizer
257
  def summarizer(rawdocs):
258
  stopwords = list(STOP_WORDS)
259
  nlp = spacy.load('en_core_web_sm')
 
293
 
294
  # Main run function
295
  if __name__ == '__main__':
 
296
  app.run(debug=True, port=7860, host='0.0.0.0', use_reloader=False)