PeterPinetree commited on
Commit
2288e0e
·
verified ·
1 Parent(s): 5296449

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +87 -4
app.py CHANGED
@@ -11,10 +11,9 @@ logging.basicConfig(
11
  )
12
  logging.debug(f"Using huggingface_hub version: {hf_version}")
13
 
14
- hf_token = os.environ.get("QWEN_BOT_TOKEN")
15
- if not hf_token:
16
- raise ValueError("Hugging Face token not found. Please set QWEN_BOT_TOKEN in the Hugging Face Secrets.")
17
- client = InferenceClient("Qwen/Qwen2.5-72B-Instruct", token=hf_token)
18
 
19
  TOPIC_EXAMPLES = {
20
  "Daily Life": {
@@ -50,6 +49,90 @@ TOPIC_EXAMPLES = {
50
  "What do you think makes a destination culturally significant?",
51
  "Describe your most challenging travel experience."
52
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
54
  }
55
 
 
11
  )
12
  logging.debug(f"Using huggingface_hub version: {hf_version}")
13
 
14
+ # Get token from environment variable
15
+ hf_token = os.environ.get("HF_TOKEN")
16
+ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", token=hf_token)
 
17
 
18
  TOPIC_EXAMPLES = {
19
  "Daily Life": {
 
49
  "What do you think makes a destination culturally significant?",
50
  "Describe your most challenging travel experience."
51
  ]
52
+ "Food": {
53
+ "beginner": [
54
+ "Do you like apples?",
55
+ "What is your favorite snack?",
56
+ "Do you eat rice or noodles?"
57
+ ],
58
+ "intermediate": [
59
+ "Can you describe how to cook your favorite dish?",
60
+ "What is your go-to comfort food and why?",
61
+ "Have you ever tried food from another country?"
62
+ ],
63
+ "advanced": [
64
+ "How does food reflect a culture’s values and traditions?",
65
+ "Compare the cuisines of two different countries.",
66
+ "What’s the most unique food you’ve ever tasted?"
67
+ ]
68
+ },
69
+ "Work & School": {
70
+ "beginner": [
71
+ "Do you go to school or work?",
72
+ "What is your teacher’s name?",
73
+ "Do you have homework?"
74
+ ],
75
+ "intermediate": [
76
+ "What do you do at your job or school?",
77
+ "What’s your favorite subject or task?",
78
+ "Do you like working with other people?"
79
+ ],
80
+ "advanced": [
81
+ "How do you stay motivated in your work or studies?",
82
+ "What are the challenges of remote learning or working?",
83
+ "How do education systems differ around the world?"
84
+ ]
85
+ },
86
+ "Hobbies": {
87
+ "beginner": [
88
+ "Do you like music?",
89
+ "What games do you play?",
90
+ "Can you draw or paint?"
91
+ ],
92
+ "intermediate": [
93
+ "What hobbies do you enjoy in your free time?",
94
+ "When did you start your favorite hobby?",
95
+ "Do you prefer indoor or outdoor hobbies?"
96
+ ],
97
+ "advanced": [
98
+ "How can hobbies contribute to personal growth?",
99
+ "What’s a hobby you would like to master and why?",
100
+ "How has technology changed the way we pursue hobbies?"
101
+ ]
102
+ },
103
+ "Shopping": {
104
+ "beginner": [
105
+ "Do you like shopping?",
106
+ "What do you buy at the store?",
107
+ "Do you go shopping alone?"
108
+ ],
109
+ "intermediate": [
110
+ "Do you prefer shopping online or in stores?",
111
+ "Tell me about your last shopping trip.",
112
+ "What kinds of things do you usually buy?"
113
+ ],
114
+ "advanced": [
115
+ "How has consumer behavior changed over time?",
116
+ "What are the pros and cons of online shopping?",
117
+ "Do advertisements affect your shopping decisions?"
118
+ ]
119
+ },
120
+ "Weather": {
121
+ "beginner": [
122
+ "Is it sunny today?",
123
+ "Do you like rain?",
124
+ "What is your favorite season?"
125
+ ],
126
+ "intermediate": [
127
+ "What’s the weather like where you are?",
128
+ "Do you like hot or cold weather?",
129
+ "How do you prepare for a rainy day?"
130
+ ],
131
+ "advanced": [
132
+ "How does climate affect daily life in your region?",
133
+ "What are the consequences of global climate change?",
134
+ "How does weather influence culture and traditions?"
135
+ ]
136
  }
137
  }
138