Spaces:
Sleeping
Sleeping
File size: 839 Bytes
46af628 14ff9c4 b62e42f 6169f27 2135f3a 6169f27 02d9582 d70c8d8 27d5216 14ff9c4 9031d57 dd3f3bf 78842d8 2135f3a d70c8d8 b3d7164 d70c8d8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import streamlit as st
import pandas as pd
from huggingface_hub import Repository
import os
# HF_TOKEN = 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
#repo = Repository(
# local_dir="data", clone_from='ppsingh/annotation_data', use_auth_token=HF_TOKEN
#)
from pathlib import Path
# assign directory
directory = os.getcwd()
# iterate over files in
# that directory
files = Path(directory).glob('*')
for file in files:
st.write(file)
auth_token = os.environ.get("TOKEN_FROM_SECRET") or True
st.write(auth_token)
data = pd.read_csv("test1.csv")
for line in data:
st.write(line)
title = st.text_input('Movie title', 'Life of Brian')
if st.button('Submit'):
new_row = {'Sentences': title}
data = data.append(new_row, ignore_index=True)
st.write(data)
st.write(os.getcwd())
data.to_csv('test.csv', index= False)
|