Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ retriever = vector_store.as_retriever(search_kwargs={"k": 3})
|
|
| 21 |
hf_token = os.environ.get("HF_TOKEN")
|
| 22 |
client = InferenceClient(model="mistralai/Mistral-7B-Instruct-v0.2", token=hf_token)
|
| 23 |
|
| 24 |
-
prompt_template = """Use the following context about
|
| 25 |
Context: {context}
|
| 26 |
Question: {question}
|
| 27 |
Answer:"""
|
|
@@ -44,9 +44,9 @@ rag_chain = (
|
|
| 44 |
|
| 45 |
# 4. Gradio UI
|
| 46 |
with gr.Blocks() as demo:
|
| 47 |
-
gr.Markdown("# 🚀
|
| 48 |
chatbot = gr.Chatbot(height=400, type="messages")
|
| 49 |
-
msg = gr.Textbox(placeholder="Ask about
|
| 50 |
clear = gr.Button("Clear")
|
| 51 |
|
| 52 |
def user(user_message, history):
|
|
|
|
| 21 |
hf_token = os.environ.get("HF_TOKEN")
|
| 22 |
client = InferenceClient(model="mistralai/Mistral-7B-Instruct-v0.2", token=hf_token)
|
| 23 |
|
| 24 |
+
prompt_template = """Use the following context about Narayanaswamy's (Bala) work experience to answer the question. If you don't know, say so.
|
| 25 |
Context: {context}
|
| 26 |
Question: {question}
|
| 27 |
Answer:"""
|
|
|
|
| 44 |
|
| 45 |
# 4. Gradio UI
|
| 46 |
with gr.Blocks() as demo:
|
| 47 |
+
gr.Markdown("# 🚀 Know more about my work expereince/portfolio...")
|
| 48 |
chatbot = gr.Chatbot(height=400, type="messages")
|
| 49 |
+
msg = gr.Textbox(placeholder="Ask about Narayanaswamy's (Bala's) work experience...")
|
| 50 |
clear = gr.Button("Clear")
|
| 51 |
|
| 52 |
def user(user_message, history):
|