Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -125,17 +125,6 @@ _search_query = RunnableBranch(
|
|
125 |
RunnableLambda(lambda x: x["question"]),
|
126 |
)
|
127 |
|
128 |
-
# Define the QA prompt template
|
129 |
-
#template = """As an expert concierge known for being helpful and a renowned guide for Birmingham, Alabama,
|
130 |
-
#I assist visitors in discovering the best that the city has to offer. I also assist the visitors about various sports and activities.
|
131 |
-
#I am well-equipped to provide valuable insights and recommendations.
|
132 |
-
#I draw upon my extensive knowledge of the area, including perennial events and historical context.
|
133 |
-
#In light of this, how can I assist you today? Feel free to ask any questions or seek recommendations for your day in Birmingham. If there's anything specific you'd like to know or experience,
|
134 |
-
#please share, and I'll be glad to help. Remember, keep the response precise short, crisp, and accurate response and don't greet.
|
135 |
-
#{context}
|
136 |
-
#Question: {question}
|
137 |
-
#Helpful Answer:"""
|
138 |
-
|
139 |
|
140 |
template = """I am a guide for Birmingham, Alabama. I can provide recommendations and insights about the city, including events and activities.
|
141 |
Ask your question directly, and I'll provide a precise and quick,short and crisp response in a conversational way without any Greet.
|
@@ -243,7 +232,7 @@ def insert_prompt(current_text, prompt):
|
|
243 |
|
244 |
|
245 |
# Create the Gradio Blocks interface
|
246 |
-
with gr.Blocks() as demo:
|
247 |
chatbot = gr.Chatbot([], elem_id="RADAR", bubble_full_width=False)
|
248 |
with gr.Row():
|
249 |
with gr.Column():
|
@@ -266,10 +255,6 @@ with gr.Blocks() as demo:
|
|
266 |
with gr.Column():
|
267 |
gr.Markdown("<h1 style='color: red;'>Example Prompts</h1>", elem_id="Example-Prompts")
|
268 |
gr.Examples(examples=examples, fn=insert_prompt, inputs=question_input, outputs=question_input)
|
269 |
-
# Define interactions
|
270 |
-
#get_response_btn.click(fn=get_response, inputs=question_input, outputs=response_output)
|
271 |
-
#generate_audio_btn.click(fn=generate_audio_elevenlabs, inputs=response_output, outputs=audio_output)
|
272 |
-
#clean_btn.click(fn=clear_fields, inputs=[], outputs=[question_input, response_output])
|
273 |
|
274 |
# Define interactions
|
275 |
get_response_btn.click(fn=chat_with_bot, inputs=[chatbot, question_input], outputs=chatbot)
|
|
|
125 |
RunnableLambda(lambda x: x["question"]),
|
126 |
)
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
template = """I am a guide for Birmingham, Alabama. I can provide recommendations and insights about the city, including events and activities.
|
130 |
Ask your question directly, and I'll provide a precise and quick,short and crisp response in a conversational way without any Greet.
|
|
|
232 |
|
233 |
|
234 |
# Create the Gradio Blocks interface
|
235 |
+
with gr.Blocks(theme="Pijush2023/pijush_theme_Everforest") as demo:
|
236 |
chatbot = gr.Chatbot([], elem_id="RADAR", bubble_full_width=False)
|
237 |
with gr.Row():
|
238 |
with gr.Column():
|
|
|
255 |
with gr.Column():
|
256 |
gr.Markdown("<h1 style='color: red;'>Example Prompts</h1>", elem_id="Example-Prompts")
|
257 |
gr.Examples(examples=examples, fn=insert_prompt, inputs=question_input, outputs=question_input)
|
|
|
|
|
|
|
|
|
258 |
|
259 |
# Define interactions
|
260 |
get_response_btn.click(fn=chat_with_bot, inputs=[chatbot, question_input], outputs=chatbot)
|