ns-devel
commited on
Commit
·
0f465e7
1
Parent(s):
38efda5
Added about and sample questions
Browse files
app.py
CHANGED
|
@@ -28,10 +28,22 @@ def download_youtube_video(video_url):
|
|
| 28 |
|
| 29 |
def main():
|
| 30 |
st.title("VideoClarify")
|
| 31 |
-
|
| 32 |
# Get video URL from user
|
| 33 |
video_url = st.text_input("Enter Video URL:", key="video_url")
|
| 34 |
selected_model = st.sidebar.selectbox("Select Model", ["Gemini", "OpenAI"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
if len(video_url):
|
| 36 |
video_url = download_youtube_video(video_url)
|
| 37 |
print(video_url)
|
|
|
|
| 28 |
|
| 29 |
def main():
|
| 30 |
st.title("VideoClarify")
|
|
|
|
| 31 |
# Get video URL from user
|
| 32 |
video_url = st.text_input("Enter Video URL:", key="video_url")
|
| 33 |
selected_model = st.sidebar.selectbox("Select Model", ["Gemini", "OpenAI"])
|
| 34 |
+
st.sidebar.subheader("About Tool:")
|
| 35 |
+
st.sidebar.markdown("""
|
| 36 |
+
VideoClarify is a tool that uses AI to summarize and answer questions about a video.
|
| 37 |
+
""")
|
| 38 |
+
st.sidebar.subheader("Explore These Questions:")
|
| 39 |
+
st.sidebar.markdown("""
|
| 40 |
+
1. Can you summarize the key points or message of the video?
|
| 41 |
+
2. What is the central theme or main idea conveyed in the video?
|
| 42 |
+
3. What specific examples or evidence are provided in the video to support the main points?
|
| 43 |
+
4. Is there a specific term or jargon used in the video that I need to clarify?
|
| 44 |
+
5. Write a well structure article based on this video
|
| 45 |
+
""")
|
| 46 |
+
|
| 47 |
if len(video_url):
|
| 48 |
video_url = download_youtube_video(video_url)
|
| 49 |
print(video_url)
|
lib/services/__pycache__/gemini.cpython-311.pyc
CHANGED
|
Binary files a/lib/services/__pycache__/gemini.cpython-311.pyc and b/lib/services/__pycache__/gemini.cpython-311.pyc differ
|
|
|
lib/services/__pycache__/openai.cpython-311.pyc
CHANGED
|
Binary files a/lib/services/__pycache__/openai.cpython-311.pyc and b/lib/services/__pycache__/openai.cpython-311.pyc differ
|
|
|
lib/services/gemini.py
CHANGED
|
@@ -34,6 +34,7 @@ Note:
|
|
| 34 |
|
| 35 |
Question: {question}
|
| 36 |
"""]
|
|
|
|
| 37 |
response_text = generate_content(model, prompt)
|
| 38 |
|
| 39 |
return response_text
|
|
|
|
| 34 |
|
| 35 |
Question: {question}
|
| 36 |
"""]
|
| 37 |
+
print("prompt", prompt)
|
| 38 |
response_text = generate_content(model, prompt)
|
| 39 |
|
| 40 |
return response_text
|
lib/services/openai.py
CHANGED
|
@@ -27,6 +27,7 @@ Question: {question}
|
|
| 27 |
"""
|
| 28 |
}
|
| 29 |
]
|
|
|
|
| 30 |
response = openai.ChatCompletion.create(
|
| 31 |
model="gpt-3.5-turbo-16k",
|
| 32 |
messages=messages,
|
|
|
|
| 27 |
"""
|
| 28 |
}
|
| 29 |
]
|
| 30 |
+
print("messages", messages)
|
| 31 |
response = openai.ChatCompletion.create(
|
| 32 |
model="gpt-3.5-turbo-16k",
|
| 33 |
messages=messages,
|