Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,9 +3,14 @@ import gradio as gr
|
|
| 3 |
|
| 4 |
client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
|
| 5 |
|
| 6 |
-
# Function to format the input into a suitable prompt for generating learning content
|
| 7 |
def format_prompt(topic, description, difficulty):
|
| 8 |
-
prompt =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
return prompt
|
| 10 |
|
| 11 |
# The function to generate learning content based on the inputs
|
|
|
|
| 3 |
|
| 4 |
client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
|
| 5 |
|
| 6 |
+
# Function to format the input into a suitable prompt for generating strict and engaging learning content
|
| 7 |
def format_prompt(topic, description, difficulty):
|
| 8 |
+
prompt = (
|
| 9 |
+
f"You are an expert educator. Generate highly engaging and educational learning content "
|
| 10 |
+
f"strictly on the topic '{topic}', with the following description: '{description}'. "
|
| 11 |
+
f"The content should be suitable for a '{difficulty}' difficulty level, and it should be presented in a way that helps readers clearly understand the key points. "
|
| 12 |
+
f"Please provide the content in paragraph form, ensuring it is both informative and interesting for the learner."
|
| 13 |
+
)
|
| 14 |
return prompt
|
| 15 |
|
| 16 |
# The function to generate learning content based on the inputs
|