CyberNative commited on
Commit
68bcc63
1 Parent(s): 817178f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -76,7 +76,13 @@ def chat_llama3_8b(message: str,
76
  )
77
 
78
  response=llm.create_chat_completion(messages=conversation, temperature=temperature)
79
- yield response
 
 
 
 
 
 
80
 
81
 
82
  # Gradio block
 
76
  )
77
 
78
  response=llm.create_chat_completion(messages=conversation, temperature=temperature)
79
+ # Access the first (and likely only) choice in the response
80
+ choice = response['choices'][0]
81
+
82
+ # Extract the text content from the message within the choice
83
+ text_response = choice['message']['content']
84
+
85
+ yield text_response
86
 
87
 
88
  # Gradio block