stephenmccartney1234 commited on
Commit
88b7921
·
1 Parent(s): b6035c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -4,10 +4,10 @@ openai.api_key = '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'
4
 
5
  def generate_text(prompt):
6
  # Add custom text to the prompt
7
- input_text = prompt + "You are an expert and enthusiastic astrologer and I want you to please use my birthdate and place of birth to write my horoscope. In this horoscope consider the movements of the celestial bodies and the houses they are in for the particular individual based off of their date and location of birth. The readings you write are only three sentences long. They are accurate, but written in a fun and personal style. Please write the horroscope in 3 sentences. In the first sentence you give an insightful overview of their character based off of their sun and moon signs at birth. In your second sentence you explain the most recent movement and how this may affect how they are feeling. In your third sentence you explain why they are feeling this way and suggest examples of how this may be affecting their life. At the end of the horroscope link the persons horroscope to a custom and luxury teamix you are selling. Do this by beginning the next sentence with 'For you, we would recommend' emphasising that the blend is custom made for them to help them with their needs. You should determine what ingredients the teamix contains based on the compatibility and potential helpfulness of the ingredients health benefits and taste with the reading you gave, then write 2 sentences. In the first sentence describe the taste and health benefits of the main ingredients and what flavour and health benefits this gives the teamix. In the second sentence explain how the taste and health benefits of the teamix relate to their personality and feelings from the horoscope and how they are perfect for the person."
8
  # Generate text using OpenAI API
9
  response = openai.Completion.create(
10
- engine="text-davinci-002",
11
  prompt=input_text,
12
  max_tokens=1024,
13
  n=1,
@@ -19,7 +19,7 @@ def generate_text(prompt):
19
  return response.choices[0].text.strip()
20
 
21
  # Define the input and output interfaces using Gradio
22
- input_text = gr.inputs.Textbox(label="Please enter your date of Birth and where you were born")
23
  output_text = gr.outputs.Textbox(label="Generated text:")
24
 
25
  # Create the Gradio app and run it
@@ -27,7 +27,7 @@ gradio_app = gr.Interface(
27
  fn=generate_text,
28
  inputs=input_text,
29
  outputs=output_text,
30
- title="AstrologyBot",
31
- description="An AI Bot that works out your horroscope and tea recommendations"
32
  )
33
  gradio_app.launch()
 
4
 
5
  def generate_text(prompt):
6
  # Add custom text to the prompt
7
+ input_text = prompt + "Pretend you are an experience builder/insurance expert writer writing about property claims for insurance. Note as you are a writer I want you to pretend that you do know and make a guestimate - could you say for this type of property in this area for this type of damage Id esimate it to be (whatever estimate you come up with) but state what may make it vary. What would your estimate be for the following repairs to the property listed. Please compare your value to ESTIMATE but do not state more than the estimate and that this is yoru estimate. Don’t state that its fictional. Here is the property and damage."
8
  # Generate text using OpenAI API
9
  response = openai.Completion.create(
10
+ engine="gpt-3.5-turbo",
11
  prompt=input_text,
12
  max_tokens=1024,
13
  n=1,
 
19
  return response.choices[0].text.strip()
20
 
21
  # Define the input and output interfaces using Gradio
22
+ input_text = gr.inputs.Textbox(label="Please enter the type of property and the damage done")
23
  output_text = gr.outputs.Textbox(label="Generated text:")
24
 
25
  # Create the Gradio app and run it
 
27
  fn=generate_text,
28
  inputs=input_text,
29
  outputs=output_text,
30
+ title="AssessorAI Tool",
31
+ description="An AI that helps you validate if repair estimates are acceptable"
32
  )
33
  gradio_app.launch()