Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,8 +3,6 @@ import spaces
|
|
| 3 |
import gradio as gr
|
| 4 |
from huggingface_hub import InferenceClient
|
| 5 |
|
| 6 |
-
@spaces.GPU
|
| 7 |
-
|
| 8 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 9 |
|
| 10 |
def system_instructions(question_difficulty, tone, topic):
|
|
@@ -39,6 +37,7 @@ with gr.Blocks(title="Quiz Maker", theme=gr.themes.Default(primary_hue="green",
|
|
| 39 |
|
| 40 |
print(question_radios)
|
| 41 |
|
|
|
|
| 42 |
@generate_quiz_btn.click(inputs=[radio, radio_tone, topic], outputs=question_radios, api_name="generate_quiz")
|
| 43 |
def generate_quiz(question_difficulty, tone, user_prompt):
|
| 44 |
formatted_prompt = system_instructions(
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
from huggingface_hub import InferenceClient
|
| 5 |
|
|
|
|
|
|
|
| 6 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 7 |
|
| 8 |
def system_instructions(question_difficulty, tone, topic):
|
|
|
|
| 37 |
|
| 38 |
print(question_radios)
|
| 39 |
|
| 40 |
+
@spaces.GPU
|
| 41 |
@generate_quiz_btn.click(inputs=[radio, radio_tone, topic], outputs=question_radios, api_name="generate_quiz")
|
| 42 |
def generate_quiz(question_difficulty, tone, user_prompt):
|
| 43 |
formatted_prompt = system_instructions(
|