benhaotang
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,9 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
|
3 |
import torch
|
4 |
import spaces
|
5 |
|
|
|
|
|
|
|
6 |
def load_model():
|
7 |
bnb_config = BitsAndBytesConfig(
|
8 |
load_in_8bit=False,
|
@@ -40,7 +43,9 @@ demo = gr.Interface(
|
|
40 |
],
|
41 |
outputs=gr.Textbox(label="Response", lines=10),
|
42 |
title="Physics AI Assistant",
|
43 |
-
description="Ask questions about physics concepts, and I'll provide detailed explanations.
|
|
|
|
|
44 |
examples=[
|
45 |
["Give me a short introduction to renormalization group(RG) flow in physics?"],
|
46 |
["What is quantum entanglement?"],
|
|
|
3 |
import torch
|
4 |
import spaces
|
5 |
|
6 |
+
MODEL_PATH = "benhaotang/mistral-small-physics-finetuned-bnb-4bit"
|
7 |
+
MODEL_URL = f"https://huggingface.co/{MODEL_PATH}"
|
8 |
+
|
9 |
def load_model():
|
10 |
bnb_config = BitsAndBytesConfig(
|
11 |
load_in_8bit=False,
|
|
|
43 |
],
|
44 |
outputs=gr.Textbox(label="Response", lines=10),
|
45 |
title="Physics AI Assistant",
|
46 |
+
description=f"""Ask questions about physics concepts, and I'll provide detailed explanations.
|
47 |
+
|
48 |
+
Model: [benhaotang/mistral-small-physics-finetuned-bnb-4bit]({MODEL_URL})""",
|
49 |
examples=[
|
50 |
["Give me a short introduction to renormalization group(RG) flow in physics?"],
|
51 |
["What is quantum entanglement?"],
|