Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,9 @@ MediaTek Research Breeze-7B (hereinafter referred to as Breeze-7B) is a language
|
|
16 |
[Breeze-7B-Base](https://huggingface.co/MediaTek-Research/Breeze-7B-Base-v1_0) is the base model for the Breeze-7B series.
|
17 |
It is suitable for use if you have substantial fine-tuning data to tune it for your specific use case.
|
18 |
[Breeze-7B-Instruct](https://huggingface.co/MediaTek-Research/Breeze-7B-Instruct-v1_0) derives from the base model Breeze-7B-Base, making the resulting model amenable to be used as-is for commonly seen tasks.
|
|
|
19 |
This App is cloned from [Demo-MR-Breeze-7B](https://huggingface.co/spaces/MediaTek-Research/Demo-MR-Breeze-7B)
|
|
|
20 |
"""
|
21 |
|
22 |
LICENSE = """
|
@@ -81,6 +83,14 @@ def refusal_condition(query):
|
|
81 |
return False
|
82 |
|
83 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
gr.Markdown(DESCRIPTION)
|
85 |
|
86 |
system_prompt = gr.Textbox(label='System prompt',
|
|
|
16 |
[Breeze-7B-Base](https://huggingface.co/MediaTek-Research/Breeze-7B-Base-v1_0) is the base model for the Breeze-7B series.
|
17 |
It is suitable for use if you have substantial fine-tuning data to tune it for your specific use case.
|
18 |
[Breeze-7B-Instruct](https://huggingface.co/MediaTek-Research/Breeze-7B-Instruct-v1_0) derives from the base model Breeze-7B-Base, making the resulting model amenable to be used as-is for commonly seen tasks.
|
19 |
+
|
20 |
This App is cloned from [Demo-MR-Breeze-7B](https://huggingface.co/spaces/MediaTek-Research/Demo-MR-Breeze-7B)
|
21 |
+
|
22 |
"""
|
23 |
|
24 |
LICENSE = """
|
|
|
83 |
return False
|
84 |
|
85 |
with gr.Blocks() as demo:
|
86 |
+
# Check if the API_URL and TOKEN are set
|
87 |
+
if API_URL is None:
|
88 |
+
gr.Error("API_URL is not set as an environment variable.")
|
89 |
+
if TOKEN is None:
|
90 |
+
gr.Error("TOKEN is not set as an environment variable.")
|
91 |
+
if MODEL_NAME is None:
|
92 |
+
gr.Error("MODEL_NAME is not set as an environment variable.")
|
93 |
+
|
94 |
gr.Markdown(DESCRIPTION)
|
95 |
|
96 |
system_prompt = gr.Textbox(label='System prompt',
|