Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from google.generativeai.types import HarmCategory, HarmBlockThreshold
|
|
5 |
import gradio as gr
|
6 |
import re
|
7 |
|
8 |
-
|
9 |
|
10 |
# Configure the Gemini API
|
11 |
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
|
@@ -62,6 +62,7 @@ def introduce_typos(text, typo_probability=0.03):
|
|
62 |
def generate_text(system_instruction, prompt):
|
63 |
|
64 |
if prompt.lower() == "refresh()":
|
|
|
65 |
chat_session = model.start_chat(history=[])
|
66 |
return "Umm"
|
67 |
|
|
|
5 |
import gradio as gr
|
6 |
import re
|
7 |
|
8 |
+
|
9 |
|
10 |
# Configure the Gemini API
|
11 |
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
|
|
|
62 |
def generate_text(system_instruction, prompt):
|
63 |
|
64 |
if prompt.lower() == "refresh()":
|
65 |
+
global chat_session
|
66 |
chat_session = model.start_chat(history=[])
|
67 |
return "Umm"
|
68 |
|