mrme77 commited on
Commit
159da36
·
verified ·
1 Parent(s): f7f44fe

Update llm_integration.py

Browse files
Files changed (1) hide show
  1. llm_integration.py +4 -0
llm_integration.py CHANGED
@@ -84,6 +84,10 @@ def generate_linkedin_post(pdf_content: str, tone: str = "Professional", retry_n
84
  try:
85
  response = openai.ChatCompletion.create(
86
  model="mistralai/mistral-small-3.2-24b-instruct:free",
 
 
 
 
87
  messages=[
88
  {"role": "system", "content": instruction},
89
  {"role": "user", "content": f"PDF Content:\n{pdf_content}"}
 
84
  try:
85
  response = openai.ChatCompletion.create(
86
  model="mistralai/mistral-small-3.2-24b-instruct:free",
87
+ extra_headers={
88
+ "HTTP-Referer": "https://huggingface.co/spaces/mrme77/PDF-To-Social-Media-Post-Generator",
89
+ "X-Title": "PDF to Social Media Post Generator",
90
+ },
91
  messages=[
92
  {"role": "system", "content": instruction},
93
  {"role": "user", "content": f"PDF Content:\n{pdf_content}"}