sanmmarr29 commited on
Commit
12eddd2
·
verified ·
1 Parent(s): bfaf549

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +4 -0
app/main.py CHANGED
@@ -41,12 +41,16 @@ async def chat(message: ChatMessage):
41
 
42
  # Generate response using pipeline
43
  response = pipe(messages)
 
 
44
 
45
  # Extract the response text
46
  if isinstance(response, list):
47
  response_text = response[0].get('generated_text', '')
 
48
  else:
49
  response_text = response.get('generated_text', '')
 
50
 
51
  return {"response": response_text}
52
 
 
41
 
42
  # Generate response using pipeline
43
  response = pipe(messages)
44
+
45
+ print(response)
46
 
47
  # Extract the response text
48
  if isinstance(response, list):
49
  response_text = response[0].get('generated_text', '')
50
+ print(response_text)
51
  else:
52
  response_text = response.get('generated_text', '')
53
+ print(response_text)
54
 
55
  return {"response": response_text}
56