Spaces:
Sleeping
Sleeping
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,30 +0,0 @@
|
|
| 1 |
-
import streamlit as st
|
| 2 |
-
from PIL import Image, ImageDraw
|
| 3 |
-
from helper import summarize_predictions_natural_language, render_results_in_image
|
| 4 |
-
from transformers import pipeline
|
| 5 |
-
from tokenizers import Tokenizer, Encoding
|
| 6 |
-
from tokenizers import decoders
|
| 7 |
-
from tokenizers import models
|
| 8 |
-
from tokenizers import normalizers
|
| 9 |
-
from tokenizers import pre_tokenizers
|
| 10 |
-
from tokenizers import processors
|
| 11 |
-
import io
|
| 12 |
-
import matplotlib.pyplot as plt
|
| 13 |
-
import requests
|
| 14 |
-
import inflect
|
| 15 |
-
from predictions import get_predictions # Replace 'your_module' with the name of the module where your function is defined
|
| 16 |
-
|
| 17 |
-
def main():
|
| 18 |
-
st.title("Object Detection App")
|
| 19 |
-
|
| 20 |
-
uploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
|
| 21 |
-
|
| 22 |
-
if uploaded_image is not None:
|
| 23 |
-
processed_image, text, audio = get_predictions(uploaded_image)
|
| 24 |
-
|
| 25 |
-
st.image(processed_image, caption='Processed Image', use_column_width=True)
|
| 26 |
-
st.write(f"Predictions: {text}")
|
| 27 |
-
st.audio(audio, format='audio/wav')
|
| 28 |
-
|
| 29 |
-
if __name__ == '__main__':
|
| 30 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|