Skip to content

Commit

Permalink
call username variable in workflow, display model name
Browse files Browse the repository at this point in the history
  • Loading branch information
salgadev committed Apr 18, 2024
1 parent 80d18e0 commit 561ac7c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/hugging_face.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Navigate to frontend directory
run: cd ./frontend
lfs: true
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: git push https://salgadev:[email protected]/spaces/salgadev/docverifyrag main
HF_USER: ${{ variables.HF_USER }}
run: git push https://$HF_USER:[email protected]/spaces/$HF_USER/docverifyrag main

7 changes: 4 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import streamlit as st
import io
import os
import streamlit as st
import tempfile

from scripts import generate_metadata, ingest
from scripts import generate_metadata, ingest, model_name


st.title('DocVerifyRAG')
Expand All @@ -19,8 +19,9 @@
st.write(f'Created temporary file {file_path}')

docs = ingest(file_path)
st.write('## Querying Together.ai API')
metadata = generate_metadata(docs)
st.write('## Converted Text')
st.write(f'## Metadata Generated by {model_name}')
st.write(metadata)

# Clean up the temporary file
Expand Down
3 changes: 2 additions & 1 deletion scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ def generate_metadata(docs):
)

# Call the LLM with the JSON schema
model_name = "mistralai/Mixtral-8x7B-Instruct-v0.1"
chat_completion = client.chat.completions.create(
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
model=model_name,
messages=[
{
"role": "system",
Expand Down

0 comments on commit 561ac7c

Please sign in to comment.