Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,31 +4,31 @@ import whisper
|
|
4 |
import tempfile
|
5 |
import gradio as gr
|
6 |
from pydub import AudioSegment
|
7 |
-
import fitz # PyMuPDF
|
8 |
-
import docx #
|
9 |
-
import pandas as pd #
|
10 |
-
#from google.colab import userdata #
|
11 |
import requests
|
12 |
from bs4 import BeautifulSoup
|
13 |
from moviepy.editor import VideoFileClip
|
14 |
import yt_dlp
|
15 |
import logging
|
16 |
|
17 |
-
#
|
18 |
logging.basicConfig(level=logging.INFO)
|
19 |
logger = logging.getLogger(__name__)
|
20 |
|
21 |
-
#
|
22 |
#openai.api_key = userdata.get('OPENAI_API_KEY')
|
23 |
|
24 |
-
#
|
25 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
26 |
|
27 |
-
#
|
28 |
model = whisper.load_model("large")
|
29 |
|
30 |
def download_social_media_video(url):
|
31 |
-
"""
|
32 |
ydl_opts = {
|
33 |
'format': 'bestaudio/best',
|
34 |
'postprocessors': [{
|
@@ -42,256 +42,256 @@ def download_social_media_video(url):
|
|
42 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
43 |
info_dict = ydl.extract_info(url, download=True)
|
44 |
audio_file = f"{info_dict['id']}.mp3"
|
45 |
-
logger.info(f"Video
|
46 |
return audio_file
|
47 |
except Exception as e:
|
48 |
-
logger.error(f"Error
|
49 |
raise
|
50 |
|
51 |
def convert_video_to_audio(video_file):
|
52 |
-
"""
|
53 |
try:
|
54 |
video = VideoFileClip(video_file)
|
55 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as temp_file:
|
56 |
video.audio.write_audiofile(temp_file.name)
|
57 |
-
logger.info(f"Video
|
58 |
return temp_file.name
|
59 |
except Exception as e:
|
60 |
-
logger.error(f"Error
|
61 |
raise
|
62 |
|
63 |
def preprocess_audio(audio_file):
|
64 |
-
"""
|
65 |
try:
|
66 |
audio = AudioSegment.from_file(audio_file)
|
67 |
audio = audio.apply_gain(-audio.dBFS + (-20))
|
68 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as temp_file:
|
69 |
audio.export(temp_file.name, format="mp3")
|
70 |
-
logger.info(f"Audio
|
71 |
return temp_file.name
|
72 |
except Exception as e:
|
73 |
-
logger.error(f"Error
|
74 |
raise
|
75 |
|
76 |
-
def
|
77 |
-
"""Transcribe
|
78 |
try:
|
79 |
if isinstance(file, str) and file.startswith('http'):
|
80 |
-
logger.info(f"
|
81 |
-
|
82 |
elif isinstance(file, str) and file.lower().endswith(('.mp4', '.avi', '.mov', '.mkv')):
|
83 |
-
logger.info(f"
|
84 |
-
|
85 |
else:
|
86 |
-
logger.info(f"
|
87 |
-
|
88 |
-
|
89 |
-
logger.info(f"
|
90 |
-
|
91 |
-
|
92 |
-
logger.info(f"
|
93 |
-
return
|
94 |
except Exception as e:
|
95 |
-
logger.error(f"Error
|
96 |
-
return f"Error
|
97 |
|
98 |
-
def
|
99 |
-
"""
|
100 |
try:
|
101 |
-
if
|
102 |
-
doc = fitz.open(
|
103 |
-
return "\n".join([
|
104 |
-
elif
|
105 |
-
doc = docx.Document(
|
106 |
-
return "\n".join([
|
107 |
-
elif
|
108 |
-
return pd.read_excel(
|
109 |
-
elif
|
110 |
-
return pd.read_csv(
|
111 |
else:
|
112 |
-
return "
|
113 |
except Exception as e:
|
114 |
-
return f"Error
|
115 |
|
116 |
-
def
|
117 |
-
"""
|
118 |
try:
|
119 |
response = requests.get(url)
|
120 |
response.raise_for_status()
|
121 |
soup = BeautifulSoup(response.content, 'html.parser')
|
122 |
return soup.get_text()
|
123 |
except Exception as e:
|
124 |
-
return f"Error
|
125 |
|
126 |
-
def
|
127 |
-
"""
|
128 |
try:
|
129 |
-
#
|
130 |
-
|
131 |
|
132 |
-
#
|
133 |
try:
|
134 |
-
|
135 |
except Exception:
|
136 |
-
|
137 |
|
138 |
return {
|
139 |
-
"
|
140 |
-
"video":
|
141 |
}
|
142 |
except Exception as e:
|
143 |
-
logger.error(f"Error
|
144 |
return None
|
145 |
|
146 |
-
def
|
147 |
-
"""
|
148 |
-
|
149 |
-
"
|
150 |
-
"
|
151 |
-
"
|
152 |
"audio_data": [],
|
153 |
-
"
|
154 |
-
"
|
155 |
}
|
156 |
-
num_audios = 5 * 3 # 5 audios/videos * 3
|
157 |
-
num_social_urls = 3 * 3 # 3
|
158 |
-
num_urls = 5 # 5 URLs
|
159 |
audios = args[:num_audios]
|
160 |
social_urls = args[num_audios:num_audios+num_social_urls]
|
161 |
urls = args[num_audios+num_social_urls:num_audios+num_social_urls+num_urls]
|
162 |
-
|
163 |
|
164 |
for url in urls:
|
165 |
if url:
|
166 |
-
|
167 |
|
168 |
-
for
|
169 |
-
if
|
170 |
-
|
171 |
|
172 |
for i in range(0, len(audios), 3):
|
173 |
-
audio_file,
|
174 |
if audio_file is not None:
|
175 |
-
|
176 |
|
177 |
for i in range(0, len(social_urls), 3):
|
178 |
-
social_url,
|
179 |
if social_url:
|
180 |
-
|
181 |
-
if
|
182 |
-
|
183 |
"url": social_url,
|
184 |
-
"
|
185 |
-
"
|
186 |
-
"
|
187 |
-
"video":
|
188 |
})
|
189 |
-
logger.info(f"
|
190 |
|
191 |
-
|
192 |
|
193 |
-
for idx, data in enumerate(
|
194 |
if data["audio"] is not None:
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
for data in
|
202 |
-
if data["
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
if data["video"]:
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
-
|
217 |
-
-
|
218 |
-
-
|
219 |
-
-
|
220 |
-
-
|
221 |
-
-
|
222 |
-
-
|
223 |
-
-
|
224 |
-
-
|
225 |
-
-
|
226 |
"""
|
227 |
|
228 |
prompt = f"""
|
229 |
-
{
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
{
|
237 |
"""
|
238 |
|
239 |
try:
|
240 |
-
|
241 |
model="gpt-4o-mini",
|
242 |
messages=[{"role": "user", "content": prompt}],
|
243 |
temperature=0.1
|
244 |
)
|
245 |
-
|
246 |
-
return
|
247 |
except Exception as e:
|
248 |
-
logger.error(f"Error
|
249 |
-
return f"Error
|
250 |
|
251 |
with gr.Blocks() as demo:
|
252 |
-
gr.Markdown("##
|
253 |
with gr.Row():
|
254 |
with gr.Column(scale=2):
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
with gr.Column(scale=3):
|
260 |
-
inputs_list = [
|
261 |
with gr.Tabs():
|
262 |
for i in range(1, 6):
|
263 |
with gr.TabItem(f"Audio/Video {i}"):
|
264 |
file = gr.File(label=f"Audio/Video {i}", type="filepath", file_types=["audio", "video"])
|
265 |
-
|
266 |
-
|
267 |
-
inputs_list.extend([file,
|
268 |
for i in range(1, 4):
|
269 |
-
with gr.TabItem(f"
|
270 |
-
social_url = gr.Textbox(label=f"
|
271 |
-
|
272 |
-
|
273 |
-
inputs_list.extend([social_url,
|
274 |
for i in range(1, 6):
|
275 |
with gr.TabItem(f"URL {i}"):
|
276 |
url = gr.Textbox(label=f"URL {i}", lines=1)
|
277 |
inputs_list.append(url)
|
278 |
for i in range(1, 6):
|
279 |
-
with gr.TabItem(f"
|
280 |
-
|
281 |
-
inputs_list.append(
|
282 |
|
283 |
-
gr.Markdown("---") #
|
284 |
|
285 |
with gr.Row():
|
286 |
-
|
287 |
|
288 |
-
gr.Markdown("---") #
|
289 |
|
290 |
with gr.Row():
|
291 |
-
|
292 |
with gr.Row():
|
293 |
-
|
294 |
|
295 |
-
|
296 |
|
297 |
-
demo.launch(share=True)
|
|
|
4 |
import tempfile
|
5 |
import gradio as gr
|
6 |
from pydub import AudioSegment
|
7 |
+
import fitz # PyMuPDF for handling PDFs
|
8 |
+
import docx # For handling .docx files
|
9 |
+
import pandas as pd # For handling .xlsx and .csv files
|
10 |
+
#from google.colab import userdata # Import userdata from google.colab
|
11 |
import requests
|
12 |
from bs4 import BeautifulSoup
|
13 |
from moviepy.editor import VideoFileClip
|
14 |
import yt_dlp
|
15 |
import logging
|
16 |
|
17 |
+
# Configure logging
|
18 |
logging.basicConfig(level=logging.INFO)
|
19 |
logger = logging.getLogger(__name__)
|
20 |
|
21 |
+
# Configure your OpenAI API key using Google Colab userdata
|
22 |
#openai.api_key = userdata.get('OPENAI_API_KEY')
|
23 |
|
24 |
+
# Load environment variables from the Hugging Face environment
|
25 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
26 |
|
27 |
+
# Load the highest quality Whisper model once
|
28 |
model = whisper.load_model("large")
|
29 |
|
30 |
def download_social_media_video(url):
|
31 |
+
"""Download a video from social media."""
|
32 |
ydl_opts = {
|
33 |
'format': 'bestaudio/best',
|
34 |
'postprocessors': [{
|
|
|
42 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
43 |
info_dict = ydl.extract_info(url, download=True)
|
44 |
audio_file = f"{info_dict['id']}.mp3"
|
45 |
+
logger.info(f"Video downloaded successfully: {audio_file}")
|
46 |
return audio_file
|
47 |
except Exception as e:
|
48 |
+
logger.error(f"Error downloading the video: {str(e)}")
|
49 |
raise
|
50 |
|
51 |
def convert_video_to_audio(video_file):
|
52 |
+
"""Convert a video file to audio."""
|
53 |
try:
|
54 |
video = VideoFileClip(video_file)
|
55 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as temp_file:
|
56 |
video.audio.write_audiofile(temp_file.name)
|
57 |
+
logger.info(f"Video converted to audio: {temp_file.name}")
|
58 |
return temp_file.name
|
59 |
except Exception as e:
|
60 |
+
logger.error(f"Error converting video to audio: {str(e)}")
|
61 |
raise
|
62 |
|
63 |
def preprocess_audio(audio_file):
|
64 |
+
"""Preprocess the audio file to improve quality."""
|
65 |
try:
|
66 |
audio = AudioSegment.from_file(audio_file)
|
67 |
audio = audio.apply_gain(-audio.dBFS + (-20))
|
68 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as temp_file:
|
69 |
audio.export(temp_file.name, format="mp3")
|
70 |
+
logger.info(f"Audio preprocessed: {temp_file.name}")
|
71 |
return temp_file.name
|
72 |
except Exception as e:
|
73 |
+
logger.error(f"Error preprocessing the audio file: {str(e)}")
|
74 |
raise
|
75 |
|
76 |
+
def transcribe_audio(file):
|
77 |
+
"""Transcribe an audio or video file."""
|
78 |
try:
|
79 |
if isinstance(file, str) and file.startswith('http'):
|
80 |
+
logger.info(f"Downloading social media video: {file}")
|
81 |
+
file_path = download_social_media_video(file)
|
82 |
elif isinstance(file, str) and file.lower().endswith(('.mp4', '.avi', '.mov', '.mkv')):
|
83 |
+
logger.info(f"Converting local video to audio: {file}")
|
84 |
+
file_path = convert_video_to_audio(file)
|
85 |
else:
|
86 |
+
logger.info(f"Preprocessing audio file: {file}")
|
87 |
+
file_path = preprocess_audio(file)
|
88 |
+
|
89 |
+
logger.info(f"Transcribing audio: {file_path}")
|
90 |
+
result = model.transcribe(file_path)
|
91 |
+
transcription = result.get("text", "Error in transcription")
|
92 |
+
logger.info(f"Transcription completed: {transcription[:50]}...")
|
93 |
+
return transcription
|
94 |
except Exception as e:
|
95 |
+
logger.error(f"Error processing the file: {str(e)}")
|
96 |
+
return f"Error processing the file: {str(e)}"
|
97 |
|
98 |
+
def read_document(document_path):
|
99 |
+
"""Read the content of a PDF, DOCX, XLSX or CSV document."""
|
100 |
try:
|
101 |
+
if document_path.endswith(".pdf"):
|
102 |
+
doc = fitz.open(document_path)
|
103 |
+
return "\n".join([page.get_text() for page in doc])
|
104 |
+
elif document_path.endswith(".docx"):
|
105 |
+
doc = docx.Document(document_path)
|
106 |
+
return "\n".join([paragraph.text for paragraph in doc.paragraphs])
|
107 |
+
elif document_path.endswith(".xlsx"):
|
108 |
+
return pd.read_excel(document_path).to_string()
|
109 |
+
elif document_path.endswith(".csv"):
|
110 |
+
return pd.read_csv(document_path).to_string()
|
111 |
else:
|
112 |
+
return "Unsupported file type. Please upload a PDF, DOCX, XLSX or CSV document."
|
113 |
except Exception as e:
|
114 |
+
return f"Error reading the document: {str(e)}"
|
115 |
|
116 |
+
def read_url(url):
|
117 |
+
"""Read the content of a URL."""
|
118 |
try:
|
119 |
response = requests.get(url)
|
120 |
response.raise_for_status()
|
121 |
soup = BeautifulSoup(response.content, 'html.parser')
|
122 |
return soup.get_text()
|
123 |
except Exception as e:
|
124 |
+
return f"Error reading the URL: {str(e)}"
|
125 |
|
126 |
+
def process_social_content(url):
|
127 |
+
"""Process the content of a social media URL, handling both text and video."""
|
128 |
try:
|
129 |
+
# First, try to read the content as text
|
130 |
+
text_content = read_url(url)
|
131 |
|
132 |
+
# Then, try to process as video
|
133 |
try:
|
134 |
+
video_content = transcribe_audio(url)
|
135 |
except Exception:
|
136 |
+
video_content = None
|
137 |
|
138 |
return {
|
139 |
+
"text": text_content,
|
140 |
+
"video": video_content
|
141 |
}
|
142 |
except Exception as e:
|
143 |
+
logger.error(f"Error processing social content: {str(e)}")
|
144 |
return None
|
145 |
|
146 |
+
def generate_news(instructions, facts, size, tone, *args):
|
147 |
+
"""Generate a news article from instructions, facts, URLs, documents, transcriptions, and social media content."""
|
148 |
+
knowledge_base = {
|
149 |
+
"instructions": instructions,
|
150 |
+
"facts": facts,
|
151 |
+
"document_content": [],
|
152 |
"audio_data": [],
|
153 |
+
"url_content": [],
|
154 |
+
"social_content": []
|
155 |
}
|
156 |
+
num_audios = 5 * 3 # 5 audios/videos * 3 fields (file, name, position)
|
157 |
+
num_social_urls = 3 * 3 # 3 social media URLs * 3 fields (URL, name, context)
|
158 |
+
num_urls = 5 # 5 general URLs
|
159 |
audios = args[:num_audios]
|
160 |
social_urls = args[num_audios:num_audios+num_social_urls]
|
161 |
urls = args[num_audios+num_social_urls:num_audios+num_social_urls+num_urls]
|
162 |
+
documents = args[num_audios+num_social_urls+num_urls:]
|
163 |
|
164 |
for url in urls:
|
165 |
if url:
|
166 |
+
knowledge_base["url_content"].append(read_url(url))
|
167 |
|
168 |
+
for document in documents:
|
169 |
+
if document is not None:
|
170 |
+
knowledge_base["document_content"].append(read_document(document.name))
|
171 |
|
172 |
for i in range(0, len(audios), 3):
|
173 |
+
audio_file, name, position = audios[i:i+3]
|
174 |
if audio_file is not None:
|
175 |
+
knowledge_base["audio_data"].append({"audio": audio_file, "name": name, "position": position})
|
176 |
|
177 |
for i in range(0, len(social_urls), 3):
|
178 |
+
social_url, social_name, social_context = social_urls[i:i+3]
|
179 |
if social_url:
|
180 |
+
social_content = process_social_content(social_url)
|
181 |
+
if social_content:
|
182 |
+
knowledge_base["social_content"].append({
|
183 |
"url": social_url,
|
184 |
+
"name": social_name,
|
185 |
+
"context": social_context,
|
186 |
+
"text": social_content["text"],
|
187 |
+
"video": social_content["video"]
|
188 |
})
|
189 |
+
logger.info(f"Social media content processed: {social_url}")
|
190 |
|
191 |
+
transcriptions_text, raw_transcriptions = "", ""
|
192 |
|
193 |
+
for idx, data in enumerate(knowledge_base["audio_data"]):
|
194 |
if data["audio"] is not None:
|
195 |
+
transcription = transcribe_audio(data["audio"])
|
196 |
+
transcription_text = f'"{transcription}" - {data["name"]}, {data["position"]}'
|
197 |
+
raw_transcription = f'[Audio/Video {idx + 1}]: "{transcription}" - {data["name"]}, {data["position"]}'
|
198 |
+
transcriptions_text += transcription_text + "\n"
|
199 |
+
raw_transcriptions += raw_transcription + "\n\n"
|
200 |
+
|
201 |
+
for data in knowledge_base["social_content"]:
|
202 |
+
if data["text"]:
|
203 |
+
transcription_text = f'[Social media text]: "{data["text"][:200]}..." - {data["name"]}, {data["context"]}'
|
204 |
+
transcriptions_text += transcription_text + "\n"
|
205 |
+
raw_transcriptions += transcription_text + "\n\n"
|
206 |
if data["video"]:
|
207 |
+
video_transcription = f'[Social media video]: "{data["video"]}" - {data["name"]}, {data["context"]}'
|
208 |
+
transcriptions_text += video_transcription + "\n"
|
209 |
+
raw_transcriptions += video_transcription + "\n\n"
|
210 |
+
|
211 |
+
document_content = "\n\n".join(knowledge_base["document_content"])
|
212 |
+
url_content = "\n\n".join(knowledge_base["url_content"])
|
213 |
+
|
214 |
+
internal_prompt = """
|
215 |
+
Instructions for the model:
|
216 |
+
- Follow the principles of news writing: always try to answer the 5 Ws of a news story in the first paragraph (Who?, What?, When?, Where?, Why?).
|
217 |
+
- Ensure that at least 80% of the quotes are direct and in quotation marks.
|
218 |
+
- The remaining 20% can be indirect quotes.
|
219 |
+
- Do not invent new information.
|
220 |
+
- Be rigorous with the provided facts.
|
221 |
+
- When processing uploaded documents, extract and highlight important quotes and verbatim testimonies from sources.
|
222 |
+
- When processing uploaded documents, extract and highlight key figures.
|
223 |
+
- Avoid using the date at the beginning of the news body. Start directly with the 5Ws.
|
224 |
+
- Include social media content relevantly, citing the source and providing appropriate context.
|
225 |
+
- Make sure to relate the provided context for social media content with its corresponding transcription or text.
|
226 |
"""
|
227 |
|
228 |
prompt = f"""
|
229 |
+
{internal_prompt}
|
230 |
+
Write a news article with the following information, including a title, a 15-word hook (additional information that complements the title), and the body content with a size of {size} words. The tone should be {tone}.
|
231 |
+
Instructions: {knowledge_base["instructions"]}
|
232 |
+
Facts: {knowledge_base["facts"]}
|
233 |
+
Additional content from documents: {document_content}
|
234 |
+
Additional content from URLs: {url_content}
|
235 |
+
Use the following transcriptions as direct and indirect quotes (without changing or inventing content):
|
236 |
+
{transcriptions_text}
|
237 |
"""
|
238 |
|
239 |
try:
|
240 |
+
response = openai.ChatCompletion.create(
|
241 |
model="gpt-4o-mini",
|
242 |
messages=[{"role": "user", "content": prompt}],
|
243 |
temperature=0.1
|
244 |
)
|
245 |
+
news_article = response['choices'][0]['message']['content']
|
246 |
+
return news_article, raw_transcriptions
|
247 |
except Exception as e:
|
248 |
+
logger.error(f"Error generating the news article: {str(e)}")
|
249 |
+
return f"Error generating the news article: {str(e)}", ""
|
250 |
|
251 |
with gr.Blocks() as demo:
|
252 |
+
gr.Markdown("## All-in-One News Generator")
|
253 |
with gr.Row():
|
254 |
with gr.Column(scale=2):
|
255 |
+
instructions = gr.Textbox(label="Instructions for the news article", lines=2)
|
256 |
+
facts = gr.Textbox(label="Describe the facts of the news", lines=4)
|
257 |
+
size = gr.Number(label="Size of the news body (in words)", value=100)
|
258 |
+
tone = gr.Dropdown(label="Tone of the news", choices=["serious", "neutral", "lighthearted"], value="neutral")
|
259 |
with gr.Column(scale=3):
|
260 |
+
inputs_list = [instructions, facts, size, tone]
|
261 |
with gr.Tabs():
|
262 |
for i in range(1, 6):
|
263 |
with gr.TabItem(f"Audio/Video {i}"):
|
264 |
file = gr.File(label=f"Audio/Video {i}", type="filepath", file_types=["audio", "video"])
|
265 |
+
name = gr.Textbox(label="Name", scale=1)
|
266 |
+
position = gr.Textbox(label="Position", scale=1)
|
267 |
+
inputs_list.extend([file, name, position])
|
268 |
for i in range(1, 4):
|
269 |
+
with gr.TabItem(f"Social Media {i}"):
|
270 |
+
social_url = gr.Textbox(label=f"Social media URL {i}", lines=1)
|
271 |
+
social_name = gr.Textbox(label=f"Person/account name {i}", scale=1)
|
272 |
+
social_context = gr.Textbox(label=f"Content context {i}", lines=2)
|
273 |
+
inputs_list.extend([social_url, social_name, social_context])
|
274 |
for i in range(1, 6):
|
275 |
with gr.TabItem(f"URL {i}"):
|
276 |
url = gr.Textbox(label=f"URL {i}", lines=1)
|
277 |
inputs_list.append(url)
|
278 |
for i in range(1, 6):
|
279 |
+
with gr.TabItem(f"Document {i}"):
|
280 |
+
document = gr.File(label=f"Document {i}", type="filepath", file_count="single")
|
281 |
+
inputs_list.append(document)
|
282 |
|
283 |
+
gr.Markdown("---") # Visual separator
|
284 |
|
285 |
with gr.Row():
|
286 |
+
transcriptions_output = gr.Textbox(label="Transcriptions", lines=10)
|
287 |
|
288 |
+
gr.Markdown("---") # Visual separator
|
289 |
|
290 |
with gr.Row():
|
291 |
+
generate = gr.Button("Generate draft")
|
292 |
with gr.Row():
|
293 |
+
news_output = gr.Textbox(label="Generated draft", lines=20)
|
294 |
|
295 |
+
generate.click(fn=generate_news, inputs=inputs_list, outputs=[news_output, transcriptions_output])
|
296 |
|
297 |
+
demo.launch(share=True)
|