AmpParth commited on
Commit
2e454fc
·
verified ·
1 Parent(s): 95b4ecb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -52,15 +52,16 @@ class GenerateResponse4(BaseModel):
52
 
53
  #Summarize function
54
  def summarize_text(text: str):
55
- response = client.completions.create(model = deployment_name,
56
- #engine="AmplifAI-Chat",
57
- prompt="The data is a pre-recorded conversation between a call center agent and a customer. Identify the following: keywords/metrics about the conversation, a summary of the conversation including details. Output should be in the format Keywords/Metrics: ,\n Summary:. \n Data: " + text,
58
- temperature=0.7,
59
- max_tokens=750,
60
- top_p=1.0,
61
- frequency_penalty=0.0,
62
- presence_penalty=0.0
63
- )
 
64
  if response.choices:
65
  # Extract the text from the response
66
  summary = response.choices[0].text.strip()
 
52
 
53
  #Summarize function
54
  def summarize_text(text: str):
55
+ response = client.completions.create(
56
+ model = deployment_name,
57
+ #engine="AmplifAI-Chat",
58
+ prompt="The data is a pre-recorded conversation between a call center agent and a customer. Identify the following: keywords/metrics about the conversation, a summary of the conversation including details. Output should be in the format Keywords/Metrics: ,\n Summary:. \n Data: " + text,
59
+ temperature=0.7,
60
+ max_tokens=750,
61
+ top_p=1.0,
62
+ frequency_penalty=0.0,
63
+ presence_penalty=0.0
64
+ )
65
  if response.choices:
66
  # Extract the text from the response
67
  summary = response.choices[0].text.strip()