Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ from huggingface_hub import HfApi
|
|
10 |
repo_id = "yxmauw/chatbot"
|
11 |
api = HfApi()
|
12 |
runtime = api.get_space_runtime(repo_id=repo_id)
|
13 |
-
space_hardware = runtime.hardware
|
14 |
-
first_string = space_hardware.split("-")[0].upper()
|
15 |
-
second_string = space_hardware.split("-")[1]
|
16 |
-
space_hardware = " ".join([first_string, second_string])
|
17 |
|
18 |
|
19 |
# Construct chatbot
|
@@ -48,7 +48,7 @@ with gr.Blocks(
|
|
48 |
# Link the dropdown with the textbox to update the description based on the selected model
|
49 |
model_dropdown.change(fn=llm_intro, inputs=model_dropdown, outputs=explanation)
|
50 |
|
51 |
-
gr.Textbox(value=f"{
|
52 |
|
53 |
|
54 |
with gr.Column(scale=4, elem_id='col'):
|
|
|
10 |
repo_id = "yxmauw/chatbot"
|
11 |
api = HfApi()
|
12 |
runtime = api.get_space_runtime(repo_id=repo_id)
|
13 |
+
# space_hardware = runtime.hardware
|
14 |
+
# first_string = space_hardware.split("-")[0].upper()
|
15 |
+
# second_string = space_hardware.split("-")[1]
|
16 |
+
# space_hardware = " ".join([first_string, second_string])
|
17 |
|
18 |
|
19 |
# Construct chatbot
|
|
|
48 |
# Link the dropdown with the textbox to update the description based on the selected model
|
49 |
model_dropdown.change(fn=llm_intro, inputs=model_dropdown, outputs=explanation)
|
50 |
|
51 |
+
gr.Textbox(value=f"{runtime.hardware}\n2 vCPU • 16 GB RAM \nFree tier", label="Space Hardware use")
|
52 |
|
53 |
|
54 |
with gr.Column(scale=4, elem_id='col'):
|