abhiimanyu commited on
Commit
ff15af7
·
verified ·
1 Parent(s): d66e57e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
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 = f"Generate detailed learning content on the topic '{topic}' with the following description: '{description}' and a difficulty level of '{difficulty}'. Please provide the content in paragraph form."
 
 
 
 
 
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