Spaces:
Runtime error
Runtime error
Update app.py
Browse files106 unmodified lines10710810911011111277 unmodified lines19019119219319419519614 unmodified lines211212213214215216217106 unmodified linesreturn FAISS.from_documents(documents, embed)def get_response_with_search(query, model, system_prompt=DEFAULT_SYSTEM_PROMPT, num_calls=3, temperature=0.2, use_embeddings=True):search_results = duckduckgo_search(query)if use_embeddings:77 unmodified lines"""demo = gr.ChatInterface(respond,additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=True, render=False),additional_inputs=[gr.Textbox(label="System Prompt", lines=5, value=DEFAULT_SYSTEM_PROMPT),14 unmodified linescache_examples=False,analytics_enabled=False,textbox=gr.Textbox(placeholder="Ask a question", container=False, scale=7),chatbot = gr.Chatbot(show_copy_button=True,likeable=True,layout="bubble",106 unmodified lines10710810911011111211311477 unmodified lines19219319419519619719814 unmodified lines213214215216217218219106 unmodified linesreturn FAISS.from_documents(documents, embed)def get_response_with_search(query, model, system_prompt=DEFAULT_SYSTEM_PROMPT, num_calls=3, temperature=0.2, use_embeddings=True):logging.info(f"get_response_with_search - Query: {query}")logging.info(f"get_response_with_search - System Prompt: {system_prompt}")search_results = duckduckgo_search(query)if use_embeddings:77 unmodified lines"""demo = gr.ChatInterface(fn=lambda message, system_prompt, history, model, temperature, num_calls, use_embeddings: respond(message, system_prompt, history, model, temperature, num_calls, use_embeddings),additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=True, render=False),additional_inputs=[gr.Textbox(label="System Prompt", lines=5, value=DEFAULT_SYSTEM_PROMPT),14 unmodified linescache_examples=False,analytics_enabled=False,textbox=gr.Textbox(placeholder="Ask a question", container=False, scale=7),chatbot=gr.Chatbot(show_copy_button=True,likeable=True,layout="bubble",
app.py+4-2