Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,7 @@ initial_output = start_trivia_game()
|
|
| 70 |
# Using gr.Blocks to create the interface
|
| 71 |
with gr.Blocks() as demo:
|
| 72 |
# Title and Description
|
| 73 |
-
gr.Markdown("#
|
| 74 |
|
| 75 |
# LLM Output Textbox
|
| 76 |
llm_output = gr.Textbox(label="LLM Output", placeholder="The output from the LLM will appear here", lines=10, value=initial_output)
|
|
@@ -83,10 +83,11 @@ with gr.Blocks() as demo:
|
|
| 83 |
|
| 84 |
# Function to update the LLM output upon submission
|
| 85 |
def update_llm_output(user_input):
|
|
|
|
| 86 |
return continue_trivia_game(user_input)
|
| 87 |
|
| 88 |
# Define interactions
|
| 89 |
submit_button.click(fn=update_llm_output, inputs=user_response, outputs=llm_output)
|
| 90 |
|
| 91 |
# Launch the Gradio app
|
| 92 |
-
demo.launch()
|
|
|
|
| 70 |
# Using gr.Blocks to create the interface
|
| 71 |
with gr.Blocks() as demo:
|
| 72 |
# Title and Description
|
| 73 |
+
gr.Markdown("# Trivia Game\nA simple trivia game using Groq's LLama 3 LLM API.")
|
| 74 |
|
| 75 |
# LLM Output Textbox
|
| 76 |
llm_output = gr.Textbox(label="LLM Output", placeholder="The output from the LLM will appear here", lines=10, value=initial_output)
|
|
|
|
| 83 |
|
| 84 |
# Function to update the LLM output upon submission
|
| 85 |
def update_llm_output(user_input):
|
| 86 |
+
# Update the LLM output and return it
|
| 87 |
return continue_trivia_game(user_input)
|
| 88 |
|
| 89 |
# Define interactions
|
| 90 |
submit_button.click(fn=update_llm_output, inputs=user_response, outputs=llm_output)
|
| 91 |
|
| 92 |
# Launch the Gradio app
|
| 93 |
+
demo.launch()
|