Spaces:
Sleeping
Sleeping
Model changed to 8b
Browse files
app.py
CHANGED
@@ -53,8 +53,8 @@ async def face_analyse(file: UploadFile = File(...)):
|
|
53 |
# Assuming categories is a list of category labels
|
54 |
return dict(zip(categories, map(float, probs)))
|
55 |
|
56 |
-
# Initialize the Meta-Llama-3-
|
57 |
-
llama_model_id = "meta-llama/Meta-Llama-3-
|
58 |
llama_pipeline = pipeline(
|
59 |
"text-generation",
|
60 |
model=llama_model_id,
|
@@ -67,7 +67,7 @@ llama_pipeline = pipeline(
|
|
67 |
@app.post("/frame-details")
|
68 |
def frame_details(text: str):
|
69 |
|
70 |
-
# Extract structured information from a given text about frames using the Meta-Llama-3-
|
71 |
|
72 |
messages = [
|
73 |
{"role": "system", "content": "You are an api chatbot for frames and glasses who always responds with only a json. Extract the infomation given into a structured json for frame details"},
|
|
|
53 |
# Assuming categories is a list of category labels
|
54 |
return dict(zip(categories, map(float, probs)))
|
55 |
|
56 |
+
# Initialize the Meta-Llama-3-8B-Instruct pipeline
|
57 |
+
llama_model_id = "meta-llama/Meta-Llama-3-8B-Instruct"
|
58 |
llama_pipeline = pipeline(
|
59 |
"text-generation",
|
60 |
model=llama_model_id,
|
|
|
67 |
@app.post("/frame-details")
|
68 |
def frame_details(text: str):
|
69 |
|
70 |
+
# Extract structured information from a given text about frames using the Meta-Llama-3-8B-Instruct model. The model will output details like price, color, etc.
|
71 |
|
72 |
messages = [
|
73 |
{"role": "system", "content": "You are an api chatbot for frames and glasses who always responds with only a json. Extract the infomation given into a structured json for frame details"},
|