Spaces:
Runtime error
Runtime error
Commit ·
f95b34a
0
Parent(s):
Duplicate from FT-BT/CallFeedback3
Browse filesFiles changed (4)
- .gitattributesAdded+34
- README.mdAdded+14
- app.pyAdded+28
- requirements.txtAdded+2
12345678910111213141516171819202122232425262728293031323334*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text1234567891011121314---title: Chat GPT 4 with Working Promptemoji: 🚀colorFrom: greencolorTo: pinksdk: gradiosdk_version: 3.21.0app_file: app.pypinned: falselicense: mitduplicated_from: FT-BT/CallFeedback3---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12345678910111213141516171819202122232425262728import gradioimport openaiimport os
#Streaming endpoint API_URL = "https://api.openai.com/v1/chat/completions" #os.getenv("API_URL") + "/generate_stream"
#Huggingface provided GPT4 OpenAI API Key OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
messages = [{"role": "system", "content": "Below is a transcript of a call, when critiquing, please attempt to understand who the salesperson and prospect are when analyzing this transcript but do not present the transcript back to me unless you are pulling a specific quote for further instruction. Ignore any spelling issues or errors as this is a transcript that may not be 100% accurate. Do your best to fill in the gaps and error on the side of the salesperson for any potential critiques. Then act as cold call sales expert Jeb Blount and give a detailed analysis and critique of this call. Do not contextualize who you are in the beginning. Do not say I. Do not say sales expert. Do not say Jeff Blount. Begin with a quick analysis of the call. Then make sure to list strengths as well as areas that use improvement and call the areas that could use improvement as potential things to consider. End with a complimentary closing that summarizes the analysis and gives a hopeful outlook on the future but don’t say or title it as a complimentary closing. Do not analyze any holds, transfers, or waiting periods before the call with the prospect and the salesperson starts."}]
def CustomChatGPT(user_input): messages.append({"role": "user", "content": user_input}) response = openai.ChatCompletion.create( model = "gpt-4", messages = messages ) ChatGPT_reply = response["choices"][0]["message"]["content"] messages.append({"role": "assistant", "content": ChatGPT_reply}) return ChatGPT_reply
demo = gradio.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "Call Feedback")
demo.launch(debug=True, inbrowser=True)12gradioopenai.gitattributesAdded+34
README.mdAdded+14
app.pyAdded+28
requirements.txtAdded+2