andreska commited on
Commit
3d3277c
·
verified ·
1 Parent(s): a2061b4

Fixed bug with multiple IDs for user_input

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -4,8 +4,11 @@ from huggingface_hub import InferenceClient
4
 
5
  api_key = os.getenv("HF_API_KEY")
6
  client = InferenceClient(api_key=api_key)
7
-
8
- user_input = st.text_input('Ask me a question')
 
 
 
9
  messages = [
10
  {
11
  "role": "user",
@@ -13,12 +16,6 @@ messages = [
13
  }
14
  ]
15
 
16
- completion = client.chat.completions.create(
17
- model="Qwen/Qwen2.5-Coder-32B-Instruct",
18
- messages=messages,
19
- max_tokens=500
20
- )
21
-
22
  user_input = st.text_input('Ask me a question')
23
  if st.button("Submit"):
24
  if user_input:
 
4
 
5
  api_key = os.getenv("HF_API_KEY")
6
  client = InferenceClient(api_key=api_key)
7
+ completion = client.chat.completions.create(
8
+ model="Qwen/Qwen2.5-Coder-32B-Instruct",
9
+ messages=messages,
10
+ max_tokens=500
11
+ )
12
  messages = [
13
  {
14
  "role": "user",
 
16
  }
17
  ]
18
 
 
 
 
 
 
 
19
  user_input = st.text_input('Ask me a question')
20
  if st.button("Submit"):
21
  if user_input: