Spaces:
Runtime error
Runtime error
Jin Ziqi commited on
Commit ·
7965fa5
1
Parent(s): ea1538a
update the interface
Browse files21 unmodified lines2223242526272829303132333435362 unmodified lines3940414243444521 unmodified linesdef greet(question):input = question + '\n\n' + "|step|subquestion|process|result|"response = openai.ChatCompletion.create(model="gpt-3.5-turbo",messages=[{"role": "system", "content": "You are a helpful assistant that generate table to solve reasoning problem."},{"role": "user", "content": input},])response = response["choices"][0]["message"]["content"]return "|step|subquestion|process|result|\n" + response2 unmodified linesinputs="text",outputs="text",title="Tab-CoT: Zero-Shot Tabular Chain-of-Thought",examples=[["Tommy is fundraising for his charity by selling brownies for $3 a slice and cheesecakes for $4 a slice. If Tommy sells 43 brownies and 23 slices of cheesecake, how much money does Tommy raise?"]])iface.launch()21 unmodified lines22232425262728293031323334353637383940412 unmodified lines444546474849505152535421 unmodified linesdef greet(question):input = question + '\n\n' + "|step|subquestion|process|result|"while True:try:response = openai.ChatCompletion.create(model="gpt-3.5-turbo",messages=[{"role": "system", "content": "You are a helpful assistant that generate table to solve reasoning problem."},{"role": "user", "content": input},])response = response["choices"][0]["message"]["content"]except:time.sleep(5)continuereturn "|step|subquestion|process|result|\n" + response2 unmodified linesinputs="text",outputs="text",title="Tab-CoT: Zero-Shot Tabular Chain-of-Thought",examples=[["Tommy is fundraising for his charity by selling brownies for $3 a slice and cheesecakes for $4 a slice. If Tommy sells 43 brownies and 23 slices of cheesecake, how much money does Tommy raise?"],["Judy teaches 5 dance classes, every day, on the weekdays and 8 classes on Saturday. If each class has 15 students and she charges $15.00 per student, how much money does she make in 1 week?"],["According to its nutritional info, a bag of chips has 250 calories per serving. If a 300g bag has 5 servings, how many grams can you eat if your daily calorie target is 2000 and you have already consumed 1800 calories?"],])iface.launch()
app.py+18-9