Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -50,19 +50,19 @@ def invoke(openai_api_key, youtube_url, process_video, prompt):
|
|
50 |
description = """<strong>Overview:</strong> The app demonstrates how to use a Large Language Model (LLM) with Retrieval Augmented Generation (RAG) on external data
|
51 |
(YouTube videos in this case, but it could be PDFs, URLs, or other structured/unstructured private/public
|
52 |
<a href='https://raw.githubusercontent.com/bstraehle/ai-ml-dl/c38b224c196fc984aab6b6cc6bdc666f8f4fbcff/langchain/document-loaders.png'>data sources</a>).\n\n
|
53 |
-
<strong>Instructions:</strong> Enter an OpenAI API key and perform LLM use cases on a YouTube video (semantic search, sentiment analysis, summarization,
|
54 |
-
The example is a short video about GPT-4.
|
55 |
<ul style="list-style-type:square;">
|
56 |
<li>Set "Process Video" to "False" and submit prompt "what is gpt-4". The LLM <strong>without</strong> RAG does not know the answer.</li>
|
57 |
<li>Set "Process Video" to "True" and submit prompt "what is gpt-4". The LLM <strong>with</strong> RAG knows the answer.</li>
|
58 |
<li>Set "Process Video" to "False" and experiment with different prompts, for example "what is gpt-4, answer in german" or "write a haiku about gpt-4".</li>
|
59 |
</ul>
|
60 |
-
In a production system processing external data would be done in a batch process
|
61 |
-
|
62 |
-
<strong>Technology:</strong> <a href='https://www.gradio.app/'>Gradio</a> UI using <a href='https://platform.openai.com/'>OpenAI</a> API
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
|
67 |
gr.close_all()
|
68 |
demo = gr.Interface(fn=invoke,
|
|
|
50 |
description = """<strong>Overview:</strong> The app demonstrates how to use a Large Language Model (LLM) with Retrieval Augmented Generation (RAG) on external data
|
51 |
(YouTube videos in this case, but it could be PDFs, URLs, or other structured/unstructured private/public
|
52 |
<a href='https://raw.githubusercontent.com/bstraehle/ai-ml-dl/c38b224c196fc984aab6b6cc6bdc666f8f4fbcff/langchain/document-loaders.png'>data sources</a>).\n\n
|
53 |
+
<strong>Instructions:</strong> Enter an OpenAI API key and perform LLM use cases on a YouTube video (semantic search, sentiment analysis, summarization,
|
54 |
+
translation, etc.) The example is a short video about GPT-4.
|
55 |
<ul style="list-style-type:square;">
|
56 |
<li>Set "Process Video" to "False" and submit prompt "what is gpt-4". The LLM <strong>without</strong> RAG does not know the answer.</li>
|
57 |
<li>Set "Process Video" to "True" and submit prompt "what is gpt-4". The LLM <strong>with</strong> RAG knows the answer.</li>
|
58 |
<li>Set "Process Video" to "False" and experiment with different prompts, for example "what is gpt-4, answer in german" or "write a haiku about gpt-4".</li>
|
59 |
</ul>
|
60 |
+
In a production system processing external data would be done in a batch process. An idea for a production system would be to perform LLM use cases on the
|
61 |
+
<a href='https://www.youtube.com/playlist?list=PL2yQDdvlhXf_hIzmfHCdbcXj2hS52oP9r'>AWS re:Invent</a> playlist.\n\n
|
62 |
+
<strong>Technology:</strong> <a href='https://www.gradio.app/'>Gradio</a> UI using <a href='https://platform.openai.com/'>OpenAI</a> API via AI-first
|
63 |
+
<a href='https://www.langchain.com/'>LangChain</a> toolkit with <a href='https://openai.com/research/whisper'>Whisper</a> (speech-to-text) and
|
64 |
+
<a href='https://openai.com/research/gpt-4'>GPT-4</a> (LLM) foundation models as well as AI-native <a href='https://www.trychroma.com/'>Chroma</a>
|
65 |
+
embedding database."""
|
66 |
|
67 |
gr.close_all()
|
68 |
demo = gr.Interface(fn=invoke,
|