Spaces:
Sleeping
Sleeping
Update llm_node.py
Browse files1 unmodified line2345678910111211 unmodified lines2425262728293031321 unmodified linefrom huggingface_hub import InferenceClientdef llm_node(question, search_result):# Initialize the Hugging Face Inference Clientclient = InferenceClient(repo_id="HuggingFaceH4/zephyr-7b-beta", # ✅ You can swap in another, e.g., mistralai/Mistral-7B-Instruct-v0.2token=os.getenv("HUGGINGFACEHUB_API_TOKEN"))# Craft the prompt carefullyprompt = f"""You are solving a GAIA benchmark evaluation question.11 unmodified linesYour answer:"""# Call the modelresponse = client.text_generation(prompt,max_new_tokens=500,temperature=0.1,top_p=0.95,1 unmodified line2345678910111211 unmodified lines242526272829303132331 unmodified linefrom huggingface_hub import InferenceClientdef llm_node(question, search_result):# Initialize the client (no repo_id here!)client = InferenceClient(token=os.getenv("HUGGINGFACEHUB_API_TOKEN"))# Define the model you want to usemodel_id = "HuggingFaceH4/zephyr-7b-beta" # You can swap this with e.g., mistralai/Mistral-7B-Instruct-v0.2# Craft the prompt carefullyprompt = f"""You are solving a GAIA benchmark evaluation question.11 unmodified linesYour answer:"""# Call the model (pass model ID here)response = client.text_generation(model=model_id,prompt=prompt,max_new_tokens=500,temperature=0.1,top_p=0.95,
llm_node.py+8-7