Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
import google.generativeai as genai
|
3 |
|
|
|
|
|
|
|
|
|
4 |
def process(text1):
|
5 |
-
|
|
|
6 |
|
7 |
def happy_tone(text2):
|
8 |
return text2+" with Happy tone"
|
|
|
1 |
import gradio as gr
|
2 |
import google.generativeai as genai
|
3 |
|
4 |
+
genai.configure(api_key=AIzaSyCY2Zx8eqRSW_V0uSAFw_4Ii6F3cNb13D8)
|
5 |
+
model = genai.GenerativeModel('gemini-pro')
|
6 |
+
|
7 |
+
|
8 |
def process(text1):
|
9 |
+
response = model.generate_content(text1)
|
10 |
+
return response.text
|
11 |
|
12 |
def happy_tone(text2):
|
13 |
return text2+" with Happy tone"
|