Spaces:
Runtime error
Runtime error
Commit
•
d803ebd
1
Parent(s):
bcbb061
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENV)
|
|
25 |
from langchain.llms import GooglePalm
|
26 |
from langchain.chains import RetrievalQAWithSourcesChain
|
27 |
llm=GooglePalm(google_api_key=GOOGLE_API_KEY, temperature=0.1, max_output_tokens=2048)
|
28 |
-
vectorStore = Pinecone.from_existing_index('
|
29 |
retriever = vectorStore.as_retriever(search_kwargs={"k": 3})
|
30 |
qa_chain_instrucEmbed = RetrievalQAWithSourcesChain.from_chain_type(llm=llm,
|
31 |
chain_type="stuff",
|
@@ -89,10 +89,10 @@ css += monospace_css + ".gradio-container {color: black}"
|
|
89 |
|
90 |
description = """
|
91 |
<div style="text-align: center;">
|
92 |
-
<h1>Ask Tennis Coach
|
93 |
</div>
|
94 |
<div style="text-align: left;">
|
95 |
-
<p>This is a demo to answer some popular questions from tennis fans to Coach
|
96 |
<ul>
|
97 |
<li>Google PALM</li>
|
98 |
<li>Gradio</li>
|
@@ -104,7 +104,7 @@ description = """
|
|
104 |
</div>
|
105 |
"""
|
106 |
disclaimer = """⚠️<b>This is an unofficial website.</b>\
|
107 |
-
<br>**Intended Use**: this app for demonstration purposes; not to serve as replacement for Coach
|
108 |
|
109 |
with gr.Blocks(theme=theme, analytics_enabled=False, css=css) as demo:
|
110 |
with gr.Column():
|
|
|
25 |
from langchain.llms import GooglePalm
|
26 |
from langchain.chains import RetrievalQAWithSourcesChain
|
27 |
llm=GooglePalm(google_api_key=GOOGLE_API_KEY, temperature=0.1, max_output_tokens=2048)
|
28 |
+
vectorStore = Pinecone.from_existing_index('macci', instructor_embeddings)
|
29 |
retriever = vectorStore.as_retriever(search_kwargs={"k": 3})
|
30 |
qa_chain_instrucEmbed = RetrievalQAWithSourcesChain.from_chain_type(llm=llm,
|
31 |
chain_type="stuff",
|
|
|
89 |
|
90 |
description = """
|
91 |
<div style="text-align: center;">
|
92 |
+
<h1>Ask Tennis Coach Rick Macci</h1>
|
93 |
</div>
|
94 |
<div style="text-align: left;">
|
95 |
+
<p>This is a demo to answer some popular questions from tennis fans to Coach Rick. The information is being extracted from his official <a href="https://www.youtube.com/@RickMacci" style='color: #e6b800;'>Youtube channel</a>. It's using the following technologies:</p>
|
96 |
<ul>
|
97 |
<li>Google PALM</li>
|
98 |
<li>Gradio</li>
|
|
|
104 |
</div>
|
105 |
"""
|
106 |
disclaimer = """⚠️<b>This is an unofficial website.</b>\
|
107 |
+
<br>**Intended Use**: this app for demonstration purposes; not to serve as replacement for Coach Rick official media channels or personal expertise."""
|
108 |
|
109 |
with gr.Blocks(theme=theme, analytics_enabled=False, css=css) as demo:
|
110 |
with gr.Column():
|