Spaces:
Runtime error
Runtime error
restructure app
Browse files- src/app.py → app.py +2 -7
src/app.py → app.py
RENAMED
@@ -11,18 +11,13 @@ from langchain.embeddings.openai import OpenAIEmbeddings
|
|
11 |
from langchain.prompts import PromptTemplate
|
12 |
from langchain.vectorstores import Chroma
|
13 |
|
14 |
-
df_path = "
|
15 |
-
chromadb_dir = "/
|
16 |
|
17 |
|
18 |
df = pd.read_csv(df_path)
|
19 |
|
20 |
|
21 |
-
def iframe_video(video_id: str):
|
22 |
-
html = f"<iframe width='580' height='315' src=https://www.youtube.com/embed/{video_id} frameborder='0' allowfullscreen></iframe>"
|
23 |
-
return html
|
24 |
-
|
25 |
-
|
26 |
def embed_video(title: str):
|
27 |
video_url = df[df["title"] == title]["url"].values[0]
|
28 |
match = re.search(r"v=([-\w]+)", video_url)
|
|
|
11 |
from langchain.prompts import PromptTemplate
|
12 |
from langchain.vectorstores import Chroma
|
13 |
|
14 |
+
df_path = "data/summary_que_data.csv"
|
15 |
+
chromadb_dir = "data/chromadb"
|
16 |
|
17 |
|
18 |
df = pd.read_csv(df_path)
|
19 |
|
20 |
|
|
|
|
|
|
|
|
|
|
|
21 |
def embed_video(title: str):
|
22 |
video_url = df[df["title"] == title]["url"].values[0]
|
23 |
match = re.search(r"v=([-\w]+)", video_url)
|