J4Lee commited on
Commit
066f466
1 Parent(s): 325df5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,7 +20,7 @@ def query_huggingface_model(prompt):
20
  return {"error": response.text}
21
 
22
 
23
- st.title("Radiology Report Generator")
24
 
25
  # User input for uploading a text file
26
  uploaded_file = st.file_uploader("Upload a text file", type=["txt"])
@@ -32,7 +32,7 @@ if uploaded_file is not None:
32
  # Display the content to the user (optional)
33
  st.text_area("Uploaded Text:", value=user_prompt, height=150)
34
 
35
- if st.button("Generate Report"):
36
  with st.spinner('Generating report...'):
37
  # Query the Hugging Face model API
38
  response = query_huggingface_model(user_prompt)
@@ -42,4 +42,4 @@ if st.button("Generate Report"):
42
  # Assuming the response is a JSON object containing the generated text
43
  report = response[0]['generated_text'] # Adjust based on the actual response structure
44
  # Display the report
45
- st.text_area("Generated Report:", value=report, height=300)
 
20
  return {"error": response.text}
21
 
22
 
23
+ st.title("RadiantScriptor")
24
 
25
  # User input for uploading a text file
26
  uploaded_file = st.file_uploader("Upload a text file", type=["txt"])
 
32
  # Display the content to the user (optional)
33
  st.text_area("Uploaded Text:", value=user_prompt, height=150)
34
 
35
+ if st.button("Generate Report-Findings"):
36
  with st.spinner('Generating report...'):
37
  # Query the Hugging Face model API
38
  response = query_huggingface_model(user_prompt)
 
42
  # Assuming the response is a JSON object containing the generated text
43
  report = response[0]['generated_text'] # Adjust based on the actual response structure
44
  # Display the report
45
+ st.text_area("Generated findings:", value=report, height=300)