Jonas Wiesli commited on
Commit
9266a10
1 Parent(s): ecce93f

added guide info, adjusted question limit

Browse files
Files changed (1) hide show
  1. app.py +20 -4
app.py CHANGED
@@ -14,7 +14,7 @@ with gr.Blocks() as iface:
14
  "but that changed real fast. The ghost is a french nobleman named Baron "
15
  "Hugo Antoine the Third. You've been trying to tell other people about "
16
  "this, but you've only been laughed at so far. But you've got evidence! "
17
- "Every night, around 10pm, the broom closet gets locked from the inside and "
18
  "the interior gets wrecked. We're talking pushed over tables, "
19
  "broken containers, the whole shebang. When it comes to the murder of "
20
  "director Eisenholz last thursday, that has to have been the ghost, "
@@ -26,7 +26,22 @@ with gr.Blocks() as iface:
26
  "You are a Curator. ",
27
  "You are a Researcher. ",
28
  "You are a Conservationist. ",
29
- "You are a Guide. "]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  i = 0
32
  while i < len(roles):
@@ -35,7 +50,7 @@ with gr.Blocks() as iface:
35
  msg.append(gr.Textbox())
36
  i += 1
37
 
38
- questionCounter = gr.Label(value="Remaining Questions: 4")
39
 
40
  def user(user_message, history):
41
  return "", history + [[user_message, None]]
@@ -88,7 +103,8 @@ with gr.Blocks() as iface:
88
 
89
  def updateQuestions(prevText):
90
  remainingQuestions = int(prevText["label"].split(": ")[1])
91
- remainingQuestions -= 1
 
92
  return "Remaining Questions: " + str(remainingQuestions)
93
 
94
  def checkIfQuestionsLeft(prevText):
 
14
  "but that changed real fast. The ghost is a french nobleman named Baron "
15
  "Hugo Antoine the Third. You've been trying to tell other people about "
16
  "this, but you've only been laughed at so far. But you've got evidence! "
17
+ "Every thursday, around 10pm, the broom closet gets locked from the inside and "
18
  "the interior gets wrecked. We're talking pushed over tables, "
19
  "broken containers, the whole shebang. When it comes to the murder of "
20
  "director Eisenholz last thursday, that has to have been the ghost, "
 
26
  "You are a Curator. ",
27
  "You are a Researcher. ",
28
  "You are a Conservationist. ",
29
+ "You are Lyanne Brimes, 27, a tour guide for a medieval history museum. You graduated from university "
30
+ "a few years ago and have a degree in history. You work here part-time. You know director Eisenholz "
31
+ "very well because you had a secret relationship. You met every Thursday in the broom cupboard for "
32
+ "your private meeting. You thought no one knew, but you are not sure anymore. Lately Eisenholz has "
33
+ "been behaving very strangely. Something was troubling him. You tried to talk to him about it the "
34
+ "night of the murder, but he never showed up. After waiting in the closet for 2 hours, you decided to "
35
+ "go home. On your way out, you noticed the door to the room with all the weapons was open, "
36
+ "but you thought Steve, the security guard, might be lurking around. Some might think Steve could be "
37
+ "the murderer because he's been going crazy lately with the whole ghost thing and because he has "
38
+ "access to every room, but you don't think he could have done it because he's kind-hearted. You are "
39
+ "not the murderer, but if you had to guess who it was, you would say it was the curator. The curator "
40
+ "and Eisenholz have been arguing recently about a medallion that has been in his family for "
41
+ "centuries, but he doesn't want to give it to the museum because it's too valuable. You think you "
42
+ "have a good nose for murder because you read detective novels. Now you're being questioned by a "
43
+ "detective. You use formal language and are very well educated in history, especially medieval "
44
+ "history. You have a bubbly personality."]
45
 
46
  i = 0
47
  while i < len(roles):
 
50
  msg.append(gr.Textbox())
51
  i += 1
52
 
53
+ questionCounter = gr.Label(value="Remaining Questions: 12")
54
 
55
  def user(user_message, history):
56
  return "", history + [[user_message, None]]
 
103
 
104
  def updateQuestions(prevText):
105
  remainingQuestions = int(prevText["label"].split(": ")[1])
106
+ if remainingQuestions > 0:
107
+ remainingQuestions -= 1
108
  return "Remaining Questions: " + str(remainingQuestions)
109
 
110
  def checkIfQuestionsLeft(prevText):