Upload 2 files
Browse files- app.py +13 -0
- requirements.txt +4 -0
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
# Load the model from another account
|
5 |
+
model_repo_id = "dbmdz/bert-base-turkish-cased" # Replace with the actual model ID
|
6 |
+
model_pipeline = pipeline("text-generation", model=model_repo_id) # Replace "task-name" with the appropriate task
|
7 |
+
|
8 |
+
st.title("Model Demo with Hugging Face Spaces")
|
9 |
+
user_input = st.text_input("Enter your input here:")
|
10 |
+
|
11 |
+
if user_input:
|
12 |
+
result = model_pipeline(user_input)
|
13 |
+
st.write("Output:", result)
|
requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
transformers
|
2 |
+
torch
|
3 |
+
python-dotenv
|
4 |
+
streamlit
|