shogi880 commited on
Commit
2906703
·
1 Parent(s): 6f0fdf8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,14 +1,15 @@
1
  import gradio as gr
2
 
3
  dictionary = {
4
- 'a playful man': "- A young man in his mid-20s to early 30s, Has a playful and energetic demeanor, with a big smile always on his face, Has a lean and athletic build, Has messy, yet stylish hair that is always styled in a way that makes it look like he just got out of bed, Has a playful twinkle in his eye, and a hint of mischief in his expression, Wears casual, comfortable clothing that is both stylish and practical,Often seen with a bag or backpack, as if he's always ready for an adventure"
5
  }
6
 
7
  def chatgpt(text):
 
8
  try:
9
- output = dictionary[text]
10
  except:
11
- output = "Please try in: https://chat.openai.com"
12
  return output
13
 
14
  with gr.Blocks() as demo:
 
1
  import gradio as gr
2
 
3
  dictionary = {
4
+ 'a-playful-man': "- A young man in his mid-20s to early 30s, Has a playful and energetic demeanor, with a big smile always on his face, Has a lean and athletic build, Has messy, yet stylish hair that is always styled in a way that makes it look like he just got out of bed, Has a playful twinkle in his eye, and a hint of mischief in his expression, Wears casual, comfortable clothing that is both stylish and practical,Often seen with a bag or backpack, as if he's always ready for an adventure"
5
  }
6
 
7
  def chatgpt(text):
8
+ query = text.replace(' ', '-')
9
  try:
10
+ output = dictionary[query]
11
  except:
12
+ output = "Please try: https://chat.openai.com"
13
  return output
14
 
15
  with gr.Blocks() as demo: