Update app.py
Browse files583 unmodified lines584585586587588589587588589590591592593583 unmodified lines else: logging.info("Using Hugging Face API") # Use Hugging Face API prompt = f"""Using the following context from the PDF documents:{context_str}Write a detailed and complete response that answers the following user question: '{query}'""" prompt = [ {"role": "system", "content": "You are a helpful assistant with access to context from PDF documents."}, {"role": "user", "content": f"Using the following context from the PDF documents:\n{context_str}\n\nWrite a detailed and complete response that answers the following user question: '{query}'"} ] client = InferenceClient(model, token=huggingface_token) app.py+4-3