citizendeeplearner commited on
Commit
00ce397
1 Parent(s): a83992e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -35
app.py CHANGED
@@ -11,45 +11,11 @@ from selenium.webdriver.chrome.service import Service
11
  from webdriver_manager.chrome import ChromeDriverManager
12
  from bs4 import BeautifulSoup
13
  from selenium.webdriver.chrome.options import Options
14
- import chromedriver_autoinstaller
15
-
16
-
17
- import glob
18
- import os
19
-
20
- import streamlit as st
21
- from selenium import webdriver
22
- from selenium.webdriver.chrome.options import Options
23
- from selenium.webdriver.support.wait import WebDriverWait
24
- from selenium.webdriver.common.by import By
25
-
26
- options = Options()
27
- options.add_argument("--headless")
28
- options.add_argument("--no-sandbox")
29
- options.add_argument("--disable-dev-shm-usage")
30
- options.add_argument("--disable-gpu")
31
- options.add_argument("--disable-features=NetworkService")
32
- options.add_argument("--window-size=1920x1080")
33
- options.add_argument("--disable-features=VizDisplayCompositor")
34
-
35
-
36
- def delete_selenium_log():
37
- if os.path.exists('selenium.log'):
38
- os.remove('selenium.log')
39
-
40
-
41
- def show_selenium_log():
42
- if os.path.exists('selenium.log'):
43
- with open('selenium.log') as f:
44
- content = f.read()
45
- st.code(content)
46
-
47
 
48
  from transformers import pipeline
49
 
50
 
51
- driver=webdriver.Chrome(options=options, service_log_path='selenium.log')
52
- #driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
53
 
54
  st.title('Music Lyrics Summarizer')
55
  st.subheader('A Summary of the lyrics of your favourite English songs, prepared by AI')
 
11
  from webdriver_manager.chrome import ChromeDriverManager
12
  from bs4 import BeautifulSoup
13
  from selenium.webdriver.chrome.options import Options
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  from transformers import pipeline
16
 
17
 
18
+ driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
 
19
 
20
  st.title('Music Lyrics Summarizer')
21
  st.subheader('A Summary of the lyrics of your favourite English songs, prepared by AI')