Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
4 |
import os
|
5 |
|
6 |
-
|
7 |
-
model = AutoModelForCausalLM.from_pretrained("HuggingFaceH4/zephyr-7b-beta")
|
8 |
-
|
9 |
-
#client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1", token=os.getenv("HF_TOKEN"))
|
10 |
|
11 |
#Dynamic prompt builder based on CEFR level
|
12 |
def level_to_prompt(level):
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
|
|
3 |
import os
|
4 |
|
5 |
+
client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1", token=os.getenv("HF_TOKEN"))
|
|
|
|
|
|
|
6 |
|
7 |
#Dynamic prompt builder based on CEFR level
|
8 |
def level_to_prompt(level):
|