NaimaAqeel commited on
Commit
e9493f7
·
verified ·
1 Parent(s): 4f4ccbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -14,7 +14,7 @@ embedding_model = SentenceTransformer('all-MiniLM-L6-v2')
14
 
15
  # Initialize the HuggingFace LLM
16
  llm = HuggingFaceEndpoint(
17
- endpoint_url="https://api-inference.huggingface.co/models/gpt2",
18
  model_kwargs={"api_key": os.getenv('HUGGINGFACEHUB_API_TOKEN')}
19
  )
20
 
@@ -121,6 +121,8 @@ def query_text(text):
121
 
122
  # Query the LLM
123
  response = llm(prompt)
 
 
124
  return response
125
  except Exception as e:
126
  print(f"Error querying text: {e}")
 
14
 
15
  # Initialize the HuggingFace LLM
16
  llm = HuggingFaceEndpoint(
17
+ endpoint_url="https://api-inference.huggingface.co/models/gpt-3.5-turbo", # Use a known model
18
  model_kwargs={"api_key": os.getenv('HUGGINGFACEHUB_API_TOKEN')}
19
  )
20
 
 
121
 
122
  # Query the LLM
123
  response = llm(prompt)
124
+ print(f"Prompt: {prompt}")
125
+ print(f"Response: {response}")
126
  return response
127
  except Exception as e:
128
  print(f"Error querying text: {e}")