TanyaVM commited on
Commit
4e6844a
·
verified ·
1 Parent(s): 1429c5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -48,13 +48,11 @@ def generate_text(user_text):
48
  {"role": "user", "content": user_text},
49
 
50
  ]
51
- plain_text = "\n".join([f"{msg['role']}: {msg['content']}" for msg in messages])
52
-
53
- if not plain_text.strip():
54
- raise ValueError("Generated text for Hugging Face model is invalid!")
55
-
56
  payload = {
57
- "inputs": json.dumps(messages),
 
58
  "parameters": {
59
  "temperature": 0.7,
60
  "max_new_tokens": 1000,
 
48
  {"role": "user", "content": user_text},
49
 
50
  ]
51
+ plain_text = json.dumps(messages)
52
+ print(plain_text)
 
 
 
53
  payload = {
54
+ "model": "TheBloke/Mistral-7B-Instruct-v0.1-GGUF",
55
+ "inputs": plain_text,
56
  "parameters": {
57
  "temperature": 0.7,
58
  "max_new_tokens": 1000,