Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,35 +1,63 @@
|
|
| 1 |
# Imports nécessaires
|
| 2 |
import os
|
| 3 |
import uuid
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
from
|
| 7 |
-
from
|
|
|
|
|
|
|
| 8 |
import streamlit as st
|
| 9 |
from audio_recorder_streamlit import audio_recorder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
from pydub import AudioSegment
|
|
|
|
| 11 |
from langchain.chains import LLMChain
|
|
|
|
| 12 |
from langchain.prompts import PromptTemplate
|
| 13 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
from reportlab.lib.pagesizes import letter
|
| 15 |
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
|
| 16 |
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
|
| 17 |
-
|
| 18 |
-
from
|
| 19 |
-
from
|
| 20 |
-
import
|
| 21 |
-
import fasttext
|
| 22 |
import yt_dlp
|
| 23 |
from youtube_transcript_api import YouTubeTranscriptApi
|
| 24 |
from urllib.parse import urlparse, parse_qs
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
import pikepdf
|
| 27 |
-
import
|
| 28 |
-
|
|
|
|
|
|
|
| 29 |
from pptx import Presentation
|
| 30 |
-
|
|
|
|
|
|
|
| 31 |
from dotenv import load_dotenv
|
| 32 |
|
|
|
|
|
|
|
| 33 |
# Chargement des variables d'environnement
|
| 34 |
load_dotenv()
|
| 35 |
SENDER_EMAIL = os.environ.get('SENDER_EMAIL')
|
|
|
|
| 1 |
# Imports nécessaires
|
| 2 |
import os
|
| 3 |
import uuid
|
| 4 |
+
|
| 5 |
+
#os.system('yt-dlp --cookies-from-browser chrome')
|
| 6 |
+
from selenium import webdriver
|
| 7 |
+
from selenium.webdriver.chrome.options import Options
|
| 8 |
+
import json
|
| 9 |
+
from datasets import load_dataset
|
| 10 |
import streamlit as st
|
| 11 |
from audio_recorder_streamlit import audio_recorder
|
| 12 |
+
|
| 13 |
+
import msoffcrypto
|
| 14 |
+
import docx
|
| 15 |
+
import pptx
|
| 16 |
+
#import pymupdf4llm
|
| 17 |
+
import tempfile
|
| 18 |
+
from typing import List, Optional, Dict, Any
|
| 19 |
from pydub import AudioSegment
|
| 20 |
+
from groq import Groq
|
| 21 |
from langchain.chains import LLMChain
|
| 22 |
+
from langchain_groq import ChatGroq
|
| 23 |
from langchain.prompts import PromptTemplate
|
| 24 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
| 25 |
+
from langchain.schema import AIMessage, HumanMessage, SystemMessage
|
| 26 |
+
from datetime import datetime
|
| 27 |
+
import smtplib
|
| 28 |
+
from email.mime.text import MIMEText
|
| 29 |
+
from email.mime.multipart import MIMEMultipart
|
| 30 |
+
from email.mime.application import MIMEApplication
|
| 31 |
+
from reportlab.lib import colors
|
| 32 |
from reportlab.lib.pagesizes import letter
|
| 33 |
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
|
| 34 |
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
|
| 35 |
+
import re
|
| 36 |
+
from docx import Document
|
| 37 |
+
from pytube import YouTube
|
| 38 |
+
from moviepy import VideoFileClip
|
|
|
|
| 39 |
import yt_dlp
|
| 40 |
from youtube_transcript_api import YouTubeTranscriptApi
|
| 41 |
from urllib.parse import urlparse, parse_qs
|
| 42 |
+
import mimetypes
|
| 43 |
+
from ratelimit import limits, sleep_and_retry
|
| 44 |
+
import time
|
| 45 |
+
import fasttext
|
| 46 |
+
import requests
|
| 47 |
+
from requests.auth import HTTPBasicAuth
|
| 48 |
import pikepdf
|
| 49 |
+
import io
|
| 50 |
+
import pypdf
|
| 51 |
+
from PyPDF2 import PdfReader
|
| 52 |
+
|
| 53 |
from pptx import Presentation
|
| 54 |
+
import trafilatura
|
| 55 |
+
from bs4 import BeautifulSoup
|
| 56 |
+
|
| 57 |
from dotenv import load_dotenv
|
| 58 |
|
| 59 |
+
load_dotenv()
|
| 60 |
+
|
| 61 |
# Chargement des variables d'environnement
|
| 62 |
load_dotenv()
|
| 63 |
SENDER_EMAIL = os.environ.get('SENDER_EMAIL')
|