Spaces:
Build error
Build error
Lost in Edits
Browse files37 unmodified lines38394041424344454647481 unmodified line50515253545516 unmodified lines7273747576777859 unmodified lines13813914014114214314414514637 unmodified linespayload = {"inputs": {"messages": []},"parameters": {"temperature": temperature,"max_new_tokens": 1000,"stream": True}}if custom_instructions:1 unmodified linepayload["inputs"]["messages"].append({"role": "user", "content": message})return payloaddef reset_conversation():'''Resets Conversation16 unmodified lines• Phi-3.5: Good at technical tasks""")temp_values = st.sidebar.slider('Select a temperature value',0.0,1.0,59 unmodified linestry:# Use the format_promt function to prepare the requestformatted_request = format_promt(prompt, custom_instructions, temp_values)output = client.post(json=formatted_request)# Create a placeholder for the streaming responsemessage_placeholder = st.empty()37 unmodified lines3839404142431 unmodified line454647484950515216 unmodified lines6970717273747559 unmodified lines13513613713813914014114214314414514614714814915015115215337 unmodified linespayload = {"inputs": {"messages": []}}if custom_instructions:1 unmodified linepayload["inputs"]["messages"].append({"role": "user", "content": message})return payloaddef reset_conversation():'''Resets Conversation16 unmodified lines• Phi-3.5: Good at technical tasks""")temp_value = st.sidebar.slider('Select a temperature value',0.0,1.0,59 unmodified linestry:# Use the format_promt function to prepare the requestformatted_request = format_promt(prompt, custom_instructions, temp_value)output = client.chat.completions.create(formated_request,temperature=temp_values,#0.5max_new_tokens=3000,stream=True)client.chat.completions.createclient.chat.completions.create# Create a placeholder for the streaming responsemessage_placeholder = st.empty()
app.py+15-8