Spaces:
Runtime error
Runtime error
Merge pull request #3 from a-b-v-k/revert-2-a-b-v-k-patch-streamlit-upgrade
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🔥
|
|
4 |
colorFrom: purple
|
5 |
colorTo: green
|
6 |
sdk: streamlit
|
7 |
-
sdk_version: 1.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
4 |
colorFrom: purple
|
5 |
colorTo: green
|
6 |
sdk: streamlit
|
7 |
+
sdk_version: 1.17.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
Utils.py
CHANGED
@@ -7,7 +7,7 @@ import streamlit as st
|
|
7 |
from youtube_transcript_api import YouTubeTranscriptApi
|
8 |
import spacy
|
9 |
|
10 |
-
@st.
|
11 |
def fetch_article_text(url: str):
|
12 |
|
13 |
r = requests.get(url)
|
@@ -20,7 +20,7 @@ def fetch_article_text(url: str):
|
|
20 |
def count_tokens(text: str):
|
21 |
return len(text.split(" "))
|
22 |
|
23 |
-
@st.
|
24 |
def get_text_from_youtube_url(url: str):
|
25 |
|
26 |
id = url.split("=")[1]
|
|
|
7 |
from youtube_transcript_api import YouTubeTranscriptApi
|
8 |
import spacy
|
9 |
|
10 |
+
@st.cache
|
11 |
def fetch_article_text(url: str):
|
12 |
|
13 |
r = requests.get(url)
|
|
|
20 |
def count_tokens(text: str):
|
21 |
return len(text.split(" "))
|
22 |
|
23 |
+
@st.cache
|
24 |
def get_text_from_youtube_url(url: str):
|
25 |
|
26 |
id = url.split("=")[1]
|