HF_RepoSense / app.py
naman1102's picture
Update app.py
63c0f13
raw
history blame
606 Bytes
import gradio as gr
import re
def process_repo_input(text):
if not text:
return "No repo IDs provided."
# Split by newlines and commas, strip whitespace
repo_ids = [repo.strip() for repo in re.split(r'[\n,]+', text) if repo.strip()]
return f"Entered repo IDs: {', '.join(repo_ids)}"
demo = gr.Interface(
fn=process_repo_input,
inputs=gr.Textbox(label="Enter repo IDs (comma or newline separated)", lines=5, placeholder="repo1, repo2\nrepo3"),
outputs="text",
title="Repo ID Input",
description="Enter repo IDs separated by commas or new lines."
)
demo.launch()