Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ YOUTUBE_URL = "https://www.youtube.com/watch?v=--khbXchTeE"
|
|
36 |
MODEL_NAME = "gpt-4"
|
37 |
|
38 |
def invoke(openai_api_key, use_rag, prompt):
|
39 |
-
print(os.listdir("
|
40 |
llm = ChatOpenAI(model_name = MODEL_NAME,
|
41 |
openai_api_key = openai_api_key,
|
42 |
temperature = 0)
|
@@ -74,7 +74,7 @@ description = """<strong>Overview:</strong> The app demonstrates how to use a La
|
|
74 |
<li>Set "Retrieval Augmented Generation" to "<strong>False</strong>" and submit prompt "explain gpt-4". The LLM <strong>without</strong> RAG does not know the answer.</li>
|
75 |
<li>Set "Retrieval Augmented Generation" to "<strong>True</strong>" and submit prompt "explain gpt-4". The LLM <strong>with</strong> RAG knows the answer.</li>
|
76 |
<li>Experiment with different prompts, for example "explain gpt-4 in german", "list pros and cons of gpt-4", or "write a poem about gpt-4".</li>
|
77 |
-
</ul
|
78 |
<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
|
79 |
<a href='https://www.langchain.com/'>LangChain</a> toolkit with <a href='https://openai.com/research/whisper'>Whisper</a> (speech-to-text) and
|
80 |
<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>
|
|
|
36 |
MODEL_NAME = "gpt-4"
|
37 |
|
38 |
def invoke(openai_api_key, use_rag, prompt):
|
39 |
+
print(os.listdir("../"))
|
40 |
llm = ChatOpenAI(model_name = MODEL_NAME,
|
41 |
openai_api_key = openai_api_key,
|
42 |
temperature = 0)
|
|
|
74 |
<li>Set "Retrieval Augmented Generation" to "<strong>False</strong>" and submit prompt "explain gpt-4". The LLM <strong>without</strong> RAG does not know the answer.</li>
|
75 |
<li>Set "Retrieval Augmented Generation" to "<strong>True</strong>" and submit prompt "explain gpt-4". The LLM <strong>with</strong> RAG knows the answer.</li>
|
76 |
<li>Experiment with different prompts, for example "explain gpt-4 in german", "list pros and cons of gpt-4", or "write a poem about gpt-4".</li>
|
77 |
+
</ul>\n\n
|
78 |
<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
|
79 |
<a href='https://www.langchain.com/'>LangChain</a> toolkit with <a href='https://openai.com/research/whisper'>Whisper</a> (speech-to-text) and
|
80 |
<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>
|