Update app.py
Browse files583 unmodified lines584585586587588589590591592583 unmodified lineselse:logging.info("Using Hugging Face API")# Use Hugging Face APIprompt = f"""Using the following context from the PDF documents:{context_str}Write a detailed and complete response that answers the following user question: '{query}'"""client = InferenceClient(model, token=huggingface_token)583 unmodified lines584585586587588589590591592593583 unmodified lineselse:logging.info("Using Hugging Face API")# Use Hugging Face APIprompt = [{"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