Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
|
| 4 |
-
# Word lists for different categories
|
| 5 |
WORD_LISTS = {
|
| 6 |
-
"animals": ["elephant", "penguin", "giraffe", "dolphin", "tiger", "lion", "zebra"],
|
| 7 |
-
"food": ["pizza", "burger", "pasta", "sushi", "taco", "cookie", "salad"],
|
| 8 |
-
"colors": ["purple", "orange", "yellow", "green", "brown", "black", "white"],
|
| 9 |
-
"countries": ["france", "japan", "india", "brazil", "egypt", "spain", "italy"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
}
|
| 11 |
|
| 12 |
CLUES = {
|
|
@@ -24,9 +29,51 @@ CLUES = {
|
|
| 24 |
"I wear a natural tuxedo",
|
| 25 |
"I swim very well"
|
| 26 |
],
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
| 29 |
|
|
|
|
| 30 |
class GameState:
|
| 31 |
def __init__(self):
|
| 32 |
self.score = 0
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
|
|
|
|
| 4 |
WORD_LISTS = {
|
| 5 |
+
"animals": ["elephant", "penguin", "giraffe", "dolphin", "tiger", "lion", "zebra", "kangaroo", "panda", "cheetah"],
|
| 6 |
+
"food": ["pizza", "burger", "pasta", "sushi", "taco", "cookie", "salad", "noodles", "sandwich", "chocolate"],
|
| 7 |
+
"colors": ["purple", "orange", "yellow", "green", "brown", "black", "white", "red", "blue", "pink"],
|
| 8 |
+
"countries": ["france", "japan", "india", "brazil", "egypt", "spain", "italy", "canada", "germany", "china"],
|
| 9 |
+
"sports": ["soccer", "cricket", "tennis", "hockey", "basketball", "baseball", "badminton", "volleyball", "golf"],
|
| 10 |
+
"technology": ["computer", "internet", "robotics", "software", "hardware", "algorithm", "database", "cybersecurity"],
|
| 11 |
+
"planets": ["earth", "mars", "venus", "jupiter", "saturn", "uranus", "neptune", "mercury", "pluto"],
|
| 12 |
+
"vehicles": ["car", "bicycle", "motorcycle", "bus", "truck", "airplane", "train", "ship", "submarine"],
|
| 13 |
+
"professions": ["doctor", "engineer", "teacher", "artist", "scientist", "lawyer", "pilot", "chef", "architect"],
|
| 14 |
+
"movies": ["inception", "avatar", "titanic", "interstellar", "joker", "gladiator", "frozen", "matrix", "avengers"]
|
| 15 |
}
|
| 16 |
|
| 17 |
CLUES = {
|
|
|
|
| 29 |
"I wear a natural tuxedo",
|
| 30 |
"I swim very well"
|
| 31 |
],
|
| 32 |
+
"soccer": [
|
| 33 |
+
"I am the most popular sport in the world",
|
| 34 |
+
"I am played with a round ball",
|
| 35 |
+
"I am known as 'football' outside the USA",
|
| 36 |
+
"I have 11 players in a team",
|
| 37 |
+
"The FIFA World Cup is my biggest event"
|
| 38 |
+
],
|
| 39 |
+
"computer": [
|
| 40 |
+
"I am an electronic machine",
|
| 41 |
+
"I process data and execute instructions",
|
| 42 |
+
"I can be a laptop or desktop",
|
| 43 |
+
"I have a CPU and memory",
|
| 44 |
+
"I am used in almost every field today"
|
| 45 |
+
],
|
| 46 |
+
"earth": [
|
| 47 |
+
"I am the third planet from the sun",
|
| 48 |
+
"I have life on me",
|
| 49 |
+
"I am 70% covered in water",
|
| 50 |
+
"I have one natural satellite",
|
| 51 |
+
"My nickname is the 'Blue Planet'"
|
| 52 |
+
],
|
| 53 |
+
"car": [
|
| 54 |
+
"I have four wheels",
|
| 55 |
+
"I run on fuel or electricity",
|
| 56 |
+
"I am used for transportation",
|
| 57 |
+
"I have an engine",
|
| 58 |
+
"You need a license to drive me"
|
| 59 |
+
],
|
| 60 |
+
"doctor": [
|
| 61 |
+
"I help sick people",
|
| 62 |
+
"I wear a white coat",
|
| 63 |
+
"I use a stethoscope",
|
| 64 |
+
"I work in hospitals or clinics",
|
| 65 |
+
"I can be a surgeon or a general physician"
|
| 66 |
+
],
|
| 67 |
+
"titanic": [
|
| 68 |
+
"I was a famous ship",
|
| 69 |
+
"I sank in 1912",
|
| 70 |
+
"I was called 'unsinkable'",
|
| 71 |
+
"A famous movie was made about me",
|
| 72 |
+
"I hit an iceberg"
|
| 73 |
+
]
|
| 74 |
}
|
| 75 |
|
| 76 |
+
|
| 77 |
class GameState:
|
| 78 |
def __init__(self):
|
| 79 |
self.score = 0
|