Spaces:
Sleeping
Sleeping
eaglelandsonce
commited on
Commit
·
5e59417
1
Parent(s):
eb68664
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,10 @@ import time
|
|
3 |
import uuid
|
4 |
from typing import List, Tuple, Optional, Dict, Union
|
5 |
|
|
|
|
|
|
|
|
|
6 |
import google.generativeai as genai
|
7 |
import gradio as gr
|
8 |
from PIL import Image
|
@@ -21,11 +25,23 @@ GETKEY = """
|
|
21 |
</div>
|
22 |
"""
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
AVATAR_IMAGES = (
|
25 |
None,
|
26 |
"https://media.roboflow.com/spaces/gemini-icon.png"
|
27 |
)
|
28 |
|
|
|
29 |
IMAGE_CACHE_DIRECTORY = "/tmp"
|
30 |
IMAGE_WIDTH = 512
|
31 |
CHAT_HISTORY = List[Tuple[Optional[Union[Tuple[str], str]], Optional[str]]]
|
|
|
3 |
import uuid
|
4 |
from typing import List, Tuple, Optional, Dict, Union
|
5 |
|
6 |
+
from trulens_eval import Tru
|
7 |
+
from trulens_eval.tru_custom_app import instrument
|
8 |
+
tru = Tru()
|
9 |
+
|
10 |
import google.generativeai as genai
|
11 |
import gradio as gr
|
12 |
from PIL import Image
|
|
|
25 |
</div>
|
26 |
"""
|
27 |
|
28 |
+
movie_script = """
|
29 |
+
Orion, in his futuristic apartment, discovers a cryptic message about an ancient artifact.
|
30 |
+
Compelled by curiosity, he embarks on a quest, joined by his skilled friend, Luna.
|
31 |
+
They navigate through uncharted territories and ancient ruins, solving puzzles and overcoming traps.
|
32 |
+
Together, they uncover a hidden chamber and retrieve the powerful artifact,
|
33 |
+
but not without triggering an alarm. In a tense escape, Luna is injured, and Orion uses the artifact to save her.
|
34 |
+
They return to the city, changed by their journey, with Orion resolved to use the artifact for the greater good,
|
35 |
+
as they stand looking towards a new future.
|
36 |
+
"""
|
37 |
+
|
38 |
+
|
39 |
AVATAR_IMAGES = (
|
40 |
None,
|
41 |
"https://media.roboflow.com/spaces/gemini-icon.png"
|
42 |
)
|
43 |
|
44 |
+
|
45 |
IMAGE_CACHE_DIRECTORY = "/tmp"
|
46 |
IMAGE_WIDTH = 512
|
47 |
CHAT_HISTORY = List[Tuple[Optional[Union[Tuple[str], str]], Optional[str]]]
|