Spaces:
Sleeping
Sleeping
Update app.py
Browse files24 unmodified lines2526272829303146 unmodified lines787980818283845 unmodified lines9091929394959624 unmodified lines# Dropdown to select modelmodel_options = ["deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",]selected_model = st.selectbox("Select Model", model_options, index=0)46 unmodified lineswith st.spinner("Generating response..."):# Prepare the payload for the APIpayload = {"inputs": prompt,"parameters": {"max_new_tokens": max_tokens,"temperature": temperature,5 unmodified lines# Dynamically construct the API URL based on the selected modelapi_url = f"https://api-inference.huggingface.co/models/{selected_model}"logger.info(f"Selected model: {selected_model}, API URL: {api_url}")# Query the Hugging Face API using the selected modeloutput = query(payload, api_url)24 unmodified lines25262728293046 unmodified lines777879808182838485865 unmodified lines9293949596979824 unmodified lines# Dropdown to select modelmodel_options = ["deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",]selected_model = st.selectbox("Select Model", model_options, index=0)46 unmodified lineswith st.spinner("Generating response..."):# Prepare the payload for the APIpayload = {"inputs": {"system_message": system_message,"user_message": prompt},"parameters": {"max_new_tokens": max_tokens,"temperature": temperature,5 unmodified lines# Dynamically construct the API URL based on the selected modelapi_url = f"https://api-inference.huggingface.co/models/{selected_model}"logger.info(f"Selected model: {selected_model}, API URL: {api_url}")print("payload:",payload)# Query the Hugging Face API using the selected modeloutput = query(payload, api_url)
app.py+5-3