Spaces:
Sleeping
Sleeping
llama 3 auskommentiert
Browse files
app.py
CHANGED
@@ -60,12 +60,13 @@ llama_pipeline = pipeline(
|
|
60 |
device_map="auto",
|
61 |
)
|
62 |
|
|
|
|
|
63 |
@app.post("/frame-details")
|
64 |
def frame_details(text: str):
|
65 |
-
|
66 |
-
Extract structured information from a given text about frames using the
|
67 |
-
|
68 |
-
"""
|
69 |
messages = [
|
70 |
{"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"},
|
71 |
{"role": "user", "content": text},
|
@@ -100,4 +101,6 @@ def frame_details(text: str):
|
|
100 |
|
101 |
if __name__ == "__main__":
|
102 |
import uvicorn
|
103 |
-
uvicorn.run(app, host="0.0.0.0", port=8000)
|
|
|
|
|
|
60 |
device_map="auto",
|
61 |
)
|
62 |
|
63 |
+
|
64 |
+
"""
|
65 |
@app.post("/frame-details")
|
66 |
def frame_details(text: str):
|
67 |
+
|
68 |
+
# Extract structured information from a given text about frames using the Meta-Llama-3-70B-Instruct model. The model will output details like price, color, etc.
|
69 |
+
|
|
|
70 |
messages = [
|
71 |
{"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"},
|
72 |
{"role": "user", "content": text},
|
|
|
101 |
|
102 |
if __name__ == "__main__":
|
103 |
import uvicorn
|
104 |
+
uvicorn.run(app, host="0.0.0.0", port=8000)
|
105 |
+
|
106 |
+
"""
|