Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ client = Groq(api_key="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"
|
|
| 6 |
|
| 7 |
# List to maintain the conversation history, starting with a default prompt
|
| 8 |
conversation_history = [
|
| 9 |
-
{"role": "system", "content": "You are an experienced fact-checker and facts curator with over 30 years of experience in gathering and verifying facts. You will present a fact/claim and ask the user to verify if it is true or false. The fact
|
| 10 |
]
|
| 11 |
|
| 12 |
# Function to count tokens (approximation)
|
|
@@ -16,7 +16,7 @@ def count_tokens(messages):
|
|
| 16 |
# Function to get the initial LLM output and start the conversation
|
| 17 |
def start_trivia_game():
|
| 18 |
# Initial message to start the game
|
| 19 |
-
initial_message = "You will present a fact
|
| 20 |
|
| 21 |
# Add the initial message to the conversation history
|
| 22 |
conversation_history.append({"role": "user", "content": initial_message})
|
|
|
|
| 6 |
|
| 7 |
# List to maintain the conversation history, starting with a default prompt
|
| 8 |
conversation_history = [
|
| 9 |
+
{"role": "system", "content": "You are an experienced fact-checker and facts curator with over 30 years of experience in gathering and verifying facts. You will present a fact/claim and ask the user to verify if it is true or false. The fact or false claim must be concise and you will award points for each correct answer."}
|
| 10 |
]
|
| 11 |
|
| 12 |
# Function to count tokens (approximation)
|
|
|
|
| 16 |
# Function to get the initial LLM output and start the conversation
|
| 17 |
def start_trivia_game():
|
| 18 |
# Initial message to start the game
|
| 19 |
+
initial_message = "You will present a fact or false claim randomly and ask me to verify if it is true or false. The fact or false claim must be concise. On inputing stop, show the total score and percentage score concisely. Let the question be a mix of facts and false claims randomly presented."
|
| 20 |
|
| 21 |
# Add the initial message to the conversation history
|
| 22 |
conversation_history.append({"role": "user", "content": initial_message})
|