ameursg commited on
Commit
1f32c4c
Β·
verified Β·
1 Parent(s): 2c6d8f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ else:
13
  raise ValueError("🚨 Hugging Face token not found! Please add it to Secrets in your Hugging Face Space.")
14
 
15
  # Load a smaller AI model that fits within 16GB memory
16
- chatbot = pipeline("text-generation", model="microsoft/phi-2", token=HF_TOKEN)
17
 
18
  def generate_itinerary(destination, start_date, end_date, traveler_type, companion):
19
  """Generates an AI-powered travel itinerary based on user preferences"""
@@ -27,7 +27,7 @@ def generate_itinerary(destination, start_date, end_date, traveler_type, compani
27
  - Provide unique local recommendations based on the traveler's interests.
28
  """
29
 
30
- response = chatbot(prompt, max_length=500, do_sample=True)
31
  return response[0]['generated_text']
32
 
33
  # Creating a simple user interface
 
13
  raise ValueError("🚨 Hugging Face token not found! Please add it to Secrets in your Hugging Face Space.")
14
 
15
  # Load a smaller AI model that fits within 16GB memory
16
+ chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-8Bit", token=HF_TOKEN)
17
 
18
  def generate_itinerary(destination, start_date, end_date, traveler_type, companion):
19
  """Generates an AI-powered travel itinerary based on user preferences"""
 
27
  - Provide unique local recommendations based on the traveler's interests.
28
  """
29
 
30
+ response = chatbot(prompt, max_length=150, do_sample=True, temperature=0.7, top_p=0.9)
31
  return response[0]['generated_text']
32
 
33
  # Creating a simple user interface