kaborg15 commited on
Commit
83f7f16
1 Parent(s): b8c36cd
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -18,7 +18,11 @@ def get_completion(prompt, temperature=0.6):
18
  "temperature":temperature,
19
  }
20
  })
21
- return output#[0]["generated_text"]
 
 
 
 
22
 
23
  def main():
24
  st.title('UiA ai koordinator\n Llama 3 8b text completion')
 
18
  "temperature":temperature,
19
  }
20
  })
21
+ #If expected format, output text as usual
22
+ if output and isinstance(output, list) and "generated_text" in output[0]:
23
+ return output[0]["generated_text"]
24
+ # Debugging
25
+ return str(output.keys())
26
 
27
  def main():
28
  st.title('UiA ai koordinator\n Llama 3 8b text completion')