namantjeaswi commited on
Commit
e7ca75f
·
1 Parent(s): 1ac30bc

update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,8 +28,8 @@ model_id = "mistralai/Mistral-7B-v0.1"
28
  #model = AutoModelForCausalLM.from_pretrained(model_id)
29
 
30
  # Create text generation pipeline
31
- pipe = pipeline(model = model_id)
32
-
33
 
34
  with st.form('my_form'):
35
  question = st.text_area('Enter your question:', 'Tell me about attention mechanisms in a transformer?')
@@ -37,4 +37,4 @@ with st.form('my_form'):
37
  if submitted:
38
  result = pipe(question, max_length=100)
39
  st.write(question)
40
- st.write(result[0]['generated_text'])
 
28
  #model = AutoModelForCausalLM.from_pretrained(model_id)
29
 
30
  # Create text generation pipeline
31
+ #pipe = pipeline(model = model_id)
32
+ pipe = pipeline('text-generation')
33
 
34
  with st.form('my_form'):
35
  question = st.text_area('Enter your question:', 'Tell me about attention mechanisms in a transformer?')
 
37
  if submitted:
38
  result = pipe(question, max_length=100)
39
  st.write(question)
40
+ st.write(result)