siddhantuniyal commited on
Commit
0bc3a97
·
1 Parent(s): c253db1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,14 +7,14 @@ api_key = "AIzaSyCmmus8HFPLXskU170_FR4j2CQeWZBKGMY"
7
  model = genai.GenerativeModel('gemini-pro')
8
  genai.configure(api_key = api_key )
9
 
10
- def get_response(input_text):
11
 
12
- response = model.generate_content(input_text)
13
  return response.text
14
 
15
  iface = gr.Interface(
16
  fn = get_response,
17
- inputs = ["text"],
18
  outputs = ["text"]
19
  )
20
  iface.launch()
 
7
  model = genai.GenerativeModel('gemini-pro')
8
  genai.configure(api_key = api_key )
9
 
10
+ def get_response(level , number_of_words , how_many_errors , topic):
11
 
12
+ response = model.generate_content(f"I have an assignment which should seem like it is made by a {level}, it should have atleast {number_of_words} characters and should contain {how_many_errors} errors. The topic is '{topic}.'")
13
  return response.text
14
 
15
  iface = gr.Interface(
16
  fn = get_response,
17
+ inputs = ["text" , "text" , "text" , "text"],
18
  outputs = ["text"]
19
  )
20
  iface.launch()