File size: 606 Bytes
1efd29f
63c0f13
1efd29f
63c0f13
 
 
 
 
 
1efd29f
fafdd5c
63c0f13
 
fafdd5c
63c0f13
 
fafdd5c
1efd29f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()