mgokg commited on
Commit
6f91b8f
·
verified ·
1 Parent(s): 2708ed1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,9 +39,9 @@ def predict(prompt):
39
  )
40
 
41
  response = chat_session.send_message(f"{prompt}\n antworte immer auf deutsch")
42
- response_data = json.loads(response)
43
  # Extrahiere den Textwert
44
- text_value = response_data['candidates'][0]['content']['parts'][0]['text']
45
  # Entferne die Markdown-Formatierung (optional)
46
  text_value = text_value.strip('```json\n').strip('```')
47
  return text_value
 
39
  )
40
 
41
  response = chat_session.send_message(f"{prompt}\n antworte immer auf deutsch")
42
+ #response_data = json.loads(response)
43
  # Extrahiere den Textwert
44
+ text_value = response['candidates'][0]['content']['parts'][0]['text']
45
  # Entferne die Markdown-Formatierung (optional)
46
  text_value = text_value.strip('```json\n').strip('```')
47
  return text_value