CogwiseAI commited on
Commit
0ad366e
1 Parent(s): 398e011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -19
app.py CHANGED
@@ -1,19 +0,0 @@
1
- import streamlit as st
2
- from transformers import pipeline
3
-
4
- model = pipeline("tiiuae/falcon-7b-instruct")
5
-
6
- def main():
7
- st.title("Hugging Face Model Demo")
8
-
9
- # Create an input text box
10
- input_text = st.text_input("Enter your text", "")
11
-
12
- # Create a button to trigger model inference
13
- if st.button("Analyze"):
14
- # Perform inference using the loaded model
15
- result = model(input_text)
16
- st.write("Prediction:", result[0]['label'], "| Score:", result[0]['score'])
17
-
18
- if __name__ == "__main__":
19
- main()