Spaces:
Runtime error
Runtime error
remove ray dependency
Browse files
app.py
CHANGED
@@ -2,15 +2,11 @@ import os
|
|
2 |
|
3 |
import gradio as gr
|
4 |
import retrieval
|
5 |
-
import ray
|
6 |
-
from dotenv import load_dotenv
|
7 |
from text_generation import Client, InferenceAPIClient
|
8 |
|
9 |
# load API keys from globally-availabe .env file
|
10 |
-
SECRETS_FILEPATH = "/mnt/project/chatbotai/huggingface_cache/internal_api_keys.env"
|
11 |
-
load_dotenv(dotenv_path=SECRETS_FILEPATH, override=True)
|
12 |
-
|
13 |
-
NUM_ANSWERS_GENERATED = 3
|
14 |
|
15 |
openchat_preprompt = (
|
16 |
"\n<human>: Hi!\n<bot>: My name is Bot, model version is 0.15, part of an open-source kit for "
|
@@ -20,10 +16,7 @@ openchat_preprompt = (
|
|
20 |
|
21 |
# LOAD MODELS
|
22 |
ta = retrieval.Retrieval()
|
23 |
-
|
24 |
-
context1 = None
|
25 |
-
context2 = None
|
26 |
-
context3 = None
|
27 |
|
28 |
|
29 |
def clip_img_search(img):
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
import retrieval
|
|
|
|
|
5 |
from text_generation import Client, InferenceAPIClient
|
6 |
|
7 |
# load API keys from globally-availabe .env file
|
8 |
+
# SECRETS_FILEPATH = "/mnt/project/chatbotai/huggingface_cache/internal_api_keys.env"
|
9 |
+
# load_dotenv(dotenv_path=SECRETS_FILEPATH, override=True)
|
|
|
|
|
10 |
|
11 |
openchat_preprompt = (
|
12 |
"\n<human>: Hi!\n<bot>: My name is Bot, model version is 0.15, part of an open-source kit for "
|
|
|
16 |
|
17 |
# LOAD MODELS
|
18 |
ta = retrieval.Retrieval()
|
19 |
+
NUM_ANSWERS_GENERATED = 3
|
|
|
|
|
|
|
20 |
|
21 |
|
22 |
def clip_img_search(img):
|