Spaces:
Sleeping
Sleeping
siddhantuniyal
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -10,15 +10,15 @@ genai.configure(api_key = api_key )
|
|
10 |
def get_response(input_text):
|
11 |
|
12 |
try:
|
13 |
-
|
14 |
-
response = model.generate_content(f"Give polarity score as a single number between 1 and 0 for the following sentence : {input_text}")
|
15 |
return response.text
|
16 |
except Exception as e:
|
17 |
return "Invalid Input"
|
18 |
|
19 |
iface = gr.Interface(
|
20 |
fn = get_response,
|
21 |
-
|
22 |
outputs = ["text"]
|
23 |
)
|
24 |
iface.launch()
|
|
|
10 |
def get_response(input_text):
|
11 |
|
12 |
try:
|
13 |
+
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}.'")
|
14 |
+
# response = model.generate_content(f"Give polarity score as a single number between 1 and 0 for the following sentence : {input_text}")
|
15 |
return response.text
|
16 |
except Exception as e:
|
17 |
return "Invalid Input"
|
18 |
|
19 |
iface = gr.Interface(
|
20 |
fn = get_response,
|
21 |
+
inputs = ["text" , "text" , "text" , "text"],
|
22 |
outputs = ["text"]
|
23 |
)
|
24 |
iface.launch()
|