zbotta commited on
Commit
a0c7985
·
1 Parent(s): 6d81b22

report Agent dockerfile and environment secrets are generated from an entry_point.sh file that will also obtain the secrets from HF Spaces.

Browse files
Files changed (3) hide show
  1. Dockerfile +8 -10
  2. README.md +10 -4
  3. src/streamlit_app.py +0 -40
Dockerfile CHANGED
@@ -5,7 +5,7 @@
5
  ########################
6
  FROM python:3.11-slim AS fetcher
7
 
8
- ARG GIT_REPO="https://github.com/zBotta/reportingAgent.git"
9
  # TODO: after tests change GIT_REF to main
10
  ARG GIT_REF=dev # branch or tag (for a specific commit, see notes below)
11
 
@@ -46,18 +46,16 @@ RUN useradd -m appuser
46
  WORKDIR /reportAgent
47
 
48
  # Install Python deps first for better layer caching
49
- # (requirements.txt is at root/)
50
- COPY src/requirements.txt reportAgent/requirements.txt
51
  RUN pip install -r requirements.txt
52
 
53
- COPY src/projectSetup.py /reportAgent/
54
- COPY src/entry_point.sh /reportAgent/
55
- RUN chmod +x /entrypoint.sh && chown -R appuser:appuser /reportAgent /entrypoint.sh /home/appuser
56
- USER appuser
57
-
58
  # Copy your app code (root/app -> /app)
59
- COPY src/reportAgent/app/ reportAgent/app/
60
- RUN chown -R appuser:appuser reportAgent/ /home/appuser
 
 
61
 
62
  # Drop root
63
  USER appuser
 
5
  ########################
6
  FROM python:3.11-slim AS fetcher
7
 
8
+ ARG GIT_REPO=https://github.com/zBotta/reportingAgent.git
9
  # TODO: after tests change GIT_REF to main
10
  ARG GIT_REF=dev # branch or tag (for a specific commit, see notes below)
11
 
 
46
  WORKDIR /reportAgent
47
 
48
  # Install Python deps first for better layer caching
49
+ COPY --from=fetcher src/requirements.txt /reportAgent/requirements.txt
 
50
  RUN pip install -r requirements.txt
51
 
52
+ COPY --from=fetcher src/projectSetup.py /reportAgent/projectSetup.py
53
+ COPY --from=fetcher src/entry_point.sh /reportAgent/entry_point.sh
 
 
 
54
  # Copy your app code (root/app -> /app)
55
+ COPY --from=fetcher src/app/ /reportAgent/app/
56
+
57
+ RUN chmod +x /reportAgent/entry_point.sh && chown -R appuser:appuser /reportAgent /reportAgent/entry_point.sh /home/appuser
58
+ RUN chown -R appuser:appuser /reportAgent/ /home/appuser
59
 
60
  # Drop root
61
  USER appuser
README.md CHANGED
@@ -12,9 +12,15 @@ short_description: A LM agent that creates reports
12
  license: mit
13
  ---
14
 
15
- # Welcome to Streamlit!
 
16
 
17
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
18
 
19
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
20
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
12
  license: mit
13
  ---
14
 
15
+ # AI Reporting Agent
16
+ An AI reporting agent that uses a Language Model to generate reports
17
 
18
+ # Description
19
 
20
+ In many industries, as part of a highly performing Quality Assurance and Customer Support functions, reporting unusual events, anomalies, or process deviations requires clear, structured documentation that captures the full context: what happened, when, where, who was involved, why it occurred, and what actions were taken… This project proposes the development of a chatbot assistant that interacts with the user to collect all relevant information through a series of structured questions. The assistant then automatically generates a well-written, standardized report based on the input.
21
+
22
+ # UI
23
+
24
+ In the presented UI, the user can charge the models that we have selected after our research.
25
+ In order to generate reports, the user fills a form and press the generate button.
26
+ The report is shown in the UI and can be downloaded as a pdf file.
src/streamlit_app.py DELETED
@@ -1,40 +0,0 @@
1
- import altair as alt
2
- import numpy as np
3
- import pandas as pd
4
- import streamlit as st
5
-
6
- """
7
- # Welcome to Streamlit!
8
-
9
- Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:.
10
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
11
- forums](https://discuss.streamlit.io).
12
-
13
- In the meantime, below is an example of what you can do with just a few lines of code:
14
- """
15
-
16
- num_points = st.slider("Number of points in spiral", 1, 10000, 1100)
17
- num_turns = st.slider("Number of turns in spiral", 1, 300, 31)
18
-
19
- indices = np.linspace(0, 1, num_points)
20
- theta = 2 * np.pi * num_turns * indices
21
- radius = indices
22
-
23
- x = radius * np.cos(theta)
24
- y = radius * np.sin(theta)
25
-
26
- df = pd.DataFrame({
27
- "x": x,
28
- "y": y,
29
- "idx": indices,
30
- "rand": np.random.randn(num_points),
31
- })
32
-
33
- st.altair_chart(alt.Chart(df, height=700, width=700)
34
- .mark_point(filled=True)
35
- .encode(
36
- x=alt.X("x", axis=None),
37
- y=alt.Y("y", axis=None),
38
- color=alt.Color("idx", legend=None, scale=alt.Scale()),
39
- size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])),
40
- ))